simpleVID app with regex support

DarkSky

Member
Apr 1, 2016
38
0
6
Hi ALL

simpleVID allows watching tv and videos from various online sources on your Apple TV. With simpleVID you can watch IPTV live streams or videos from various internet websites. Add a link to a channel or M3U playlist and watch what you like. You can create channels for your websites and provide a simple and clean way to watch online videos from those websites on Apple TV.

here some example regex codes


Code:
https://pastebin.com/FeAmcPZ4
https://pastebin.com/YmcdddeM
https://pastebin.com/41BkE8B9
https://pastebin.com/ybmM45Qm
https://pastebin.com/sH342qxf
can someone create regex this link for me
Code:
https://www.livenewswatch.com/cnn-news-usa.html
 

streamwatcher2013

Active member
Oct 24, 2013
474
88
28
USA
Try this to see it works for you. It my first code for this:

Code:
{
  "comment":"simpleVID CNN News",
  "svChannel":{
    "name":"CNN News",
    "version":"1.0",
    "title":"CNN News",
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
    "screens":[
      {
        "name":"main",
        "title":"CNN News USA",
        "link":"https://www.livenewswatch.com/cnn-news-usa.html",
        "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
        "content":[
          {
            "type":"regex",
            "nextScreen":"videoPlayer",
            "title":"CNN News USA",
            "link":"https://www.livenewswatch.com/cnn-news-usa.html",
            "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
            "regexVideoPlayer":{ "myElement[\w\W]*?(?:source|src|file):.+?[\'"]([^\'"]+)", "link":"$1" }
          }
        ]
      }
    ]
}
 
  • Like
Reactions: DarkSky

DarkSky

Member
Apr 1, 2016
38
0
6
I'm not an expert and need help

on this site you can read how it works

Code:
http://omomomo.com/svid-support/
 

DarkSky

Member
Apr 1, 2016
38
0
6
@streamwatcher2013
thank you for you help but your regex code not work
look this code i postet works great maybe you can understand how it work.

Code:
{
  "comment":"simpleVID Kids Math TV",
  "svChannel":{
    "name":"kidsmathtv",
    "version":"1.0",
    "title":"Kids Math TV",
    "image":"https://www.kidsmathtv.com/wp-content/uploads/2016/02/web-2.png",
    "screens":[
      {
        "name":"main",
        "title":"Kids Math TV",
        "link":"https://www.kidsmathtv.com/videos-by-level/",
        "image":"",
        "content":[
          {
            "type":"regex",
            "nextScreen":"videos",
            "titles":"<div class=\"sc-col-[\\s\\S]*?<h2><.*?>(.*?)<[\\s\\S]*?<a href=\".*?\"><img.*?src=\".*?\"",
            "links":"<div class=\"sc-col-[\\s\\S]*?<h2><.*?>.*?<[\\s\\S]*?<a href=\"(.*?)\"><img.*?src=\".*?\"",
            "images":"<div class=\"sc-col-[\\s\\S]*?<h2><.*?>.*?<[\\s\\S]*?<a href=\".*?\"><img.*?src=\"(.*?)\"",
            "infos":""
          }
        ]
      },
      {
        "name":"videos",
        "content":[
          {
            "type":"regex",
            "nextScreen":"details",
            "titles":"<div class=\"sc-col-4-1[\\s\\S]*?<h3.*?>(.*?)<[\\s\\S]*?<a href=\".*?\"><img.*?src=\".*?\".*?a>.*?<",
            "links":"<div class=\"sc-col-4-1[\\s\\S]*?<h3.*?>.*?<[\\s\\S]*?<a href=\"(.*?)\"><img.*?src=\".*?\".*?a>.*?<",
            "images":"<div class=\"sc-col-4-1[\\s\\S]*?<h3.*?>.*?<[\\s\\S]*?<a href=\".*?\"><img.*?src=\"(.*?)\".*?a>.*?<",
            "infos":"<div class=\"sc-col-4-1[\\s\\S]*?<h3.*?>.*?<[\\s\\S]*?<a href=\".*?\"><img.*?src=\".*?\".*?a>(.*?)<"
          }
        ]
      },
      {
        "name":"details",
        "content":[
          {
            "type":"regex",
            "nextScreen":"videoPlayer",
            "titles":"\"file\":\".*?\"()",
            "links":"\"file\":\"(.*?)\"",
            "images":"",
            "infos":"",
            "filters":[
              {
                "what":"titles",
                "prefix":"PLAY"
              }
            ]
          }
        ]
      }
    ]
  }
}
 

streamwatcher2013

Active member
Oct 24, 2013
474
88
28
USA
May be like this:

Code:
{
  "comment":"simpleVID CNN News",
  "svChannel":{
    "name":"CNN News",
    "version":"1.0",
    "title":"CNN News",
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
    "screens":[

      {
        "name":"main",
        "title":"CNN News USA",
        "nextScreen":"videos",
        "link":"https://www.livenewswatch.com/cnn-news-usa.html",
        "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
       },

       {
        "name":"videos",
        "content":[
          {
            "type":"regex",
            "nextScreen":"videoPlayer",
            "title":"CNN News USA",
            "link":"file:\\s*\"(.*?)\"",
            "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
            "filters":[
              {
                "what":"titles",
                "prefix":"PLAY"
               }
             ]
           }
        ]
      }
    ]
  }
}
 
  • Like
Reactions: DarkSky

DarkSky

Member
Apr 1, 2016
38
0
6
ok now live stream (Sky News) regex from youtube works

Code:
{"comment":"simpleVID Sky News TV","svChannel":{"name":"skytv","version":"1.0","title":"Sky News Live","image":"https://upload.wikimedia.org/wikipedia/commons/b/b4/Sky-news-logo.png","screens":[{"name":"main","title":"Sky TV","link":"https://www.youtube.com/watch?v=siyW0GOBtbo","content":[{"type":"dynamic","nextScreen":"videoPlayer","regex":"hlsManifestUrl\\x5C\":\\x5C\"(.*?)\\x5C\"","title":"Sky News","link":"$1","filters":[{"op":["replace","title","\\/","/"]}]}]}]}}



when i click the logo it looks like this




after I click on the Sky News i see the live stream .-)




@streamwatcher2013
Is it possible to do that for others sites with live stream too?
 

streamwatcher2013

Active member
Oct 24, 2013
474
88
28
USA
Could you try either one of these? I am starting figure out little bit on this coding. I don't need filter option on this link because nothing change or replace or multiple choice.

Code:
{
  "comment":"simpleVID CNN News",
  "svChannel":{
    "name":"CNN News",
    "version":"1.0",
    "title":"CNN News",
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
    "screens":[
      {
        "name":"main",
        "title":"CNN News USA",
        "link":"https://www.livenewswatch.com/cnn-news-usa.html",
        "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
        "content":[
        {
          "type":"dynamic",
           "nextScreen":"videoPlayer",
           "title":"CNN News USA",
           "regex":"file:\\s*\"(.*?)\"","link":"$1",
          }
        ]
      }
    ]
  }
}

====== OR ===========

{
  "comment":"simpleVID CNN News",
  "svChannel":{
    "name":"CNN News",
    "version":"1.0",
    "title":"CNN News",
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
    "screens":[
      {
        "name":"main",
        "title":"CNN News USA",
        "link":"https://www.livenewswatch.com/cnn-news-usa.html",
        "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
        "content":[
        {
          "type":"dynamic",
           "nextScreen":"videoPlayer",
           "title":"CNN News USA",
           "regex":"(?s)myElement.*?file:.+?[\'\"]([^\'\"]+).+?file.+?\/([^\'\"]+)","link":"$1",
           "image":"https://www.livenewswatch.com/$2",
          }
        ]
      }
    ]
  }
}
 
  • Like
Reactions: DarkSky

DarkSky

Member
Apr 1, 2016
38
0
6
the first code looks good but when playing the stream I get an error

i think you must edit the regex string


look pictures







the second code can not be added because the regex string is invalid and destroys the other strings (tiitle name, image logo)

could not find any valid data under given url

 

streamwatcher2013

Active member
Oct 24, 2013
474
88
28
USA
Thz. The regex only does one line without next line. In the source it has 2 file:
Could you remove the "regex" and replace the "link" with this on code 1?
"link":"file:[\\s\\S]*?\"(h.*?)\"",
 
  • Like
Reactions: DarkSky

DarkSky

Member
Apr 1, 2016
38
0
6
Did it like you said it, i remove the regex and replace it with this link
"link":"file:[\\s\\S]*?\"(h.*?)\"",

not work the same result is displayed from my post 4
after the image logo its look empty

but if i replace with this

"regex":"file:[\\s\\S]*?\"(h.*?)\"",

i get now 2 links with CNN News USA

I have both tested I get no error message but see no live stream it tries to load but nothing happens







 

DarkSky

Member
Apr 1, 2016
38
0
6
and if i replace the regex with this long regex code:

"regex":"file:\\s*\"(.*?)\"","link":"file:[\\s\\S]*?\"(h.*?)\"",

i see only 1 link name but no live stream playing nothing load black



 

DarkSky

Member
Apr 1, 2016
38
0
6
The full code I used for my post 8 is this here

Code:
{
  "comment":"simpleVID CNN News",
  "svChannel":{
    "name":"CNN News",
    "version":"1.0",
    "title":"CNN News",
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
    "screens":[
      {
        "name":"main",
        "title":"CNN News USA",
        "link":"https://www.livenewswatch.com/cnn-news-usa.html",
        "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
        "content":[
        {
          "type":"dynamic",
           "nextScreen":"videoPlayer",
           "title":"CNN News USA",
           "regex":"file:[\\s\\S]*?\"(h.*?)\"",
          }
        ]
      }
    ]
  }
}

The full code I used for my post 9 is this here

Code:
{
  "comment":"simpleVID CNN News",
  "svChannel":{
    "name":"CNN News",
    "version":"1.0",
    "title":"CNN News",
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
    "screens":[
      {
        "name":"main",
        "title":"CNN News USA",
        "link":"https://www.livenewswatch.com/cnn-news-usa.html",
        "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
        "content":[
        {
          "type":"dynamic",
           "nextScreen":"videoPlayer",
           "title":"CNN News USA",
           "regex":"file:\\s*\"(.*?)\"","link":"file:[\\s\\S]*?\"(h.*?)\"",
          }
        ]
      }
    ]
  }
}
 

streamwatcher2013

Active member
Oct 24, 2013
474
88
28
USA
I hope this one will work for you. The regex for simpleVID is completely different with the one i been using for LSP. Thanks for testing. I don't have Aplle TV to test this app.

Code:
{
  "comment":"simpleVID Live News Watch",
  "svChannel":{
    "name":"livenewswatch",
    "version":"1.0",
    "title":"Live News Watch",
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/07/1-300x64.png",
    "screens":[

      {
        "name":"main",
        "title":"Live News Watch",
        "link":"https://www.livenewswatch.com/",
        "image":"",
        "content":[
          {
            "type":"regex",
            "nextScreen":"vidcontain",
            "titles":"<div class=\"td-module-thumb\"[\\s\\S]*?href=\".*?\"[\\s\\S]*?title=\"(.*?)\"[\\s\\S]*?ata-lazy-src=\".*?\"",
            "links":"<div class=\"td-module-thumb\"[\\s\\S]*?href=\"(.*?)\"[\\s\\S]*?title=\".*?\"[\s\S]*?ata-lazy-src=\".*?\"",
            "images":"<div class=\"td-module-thumb\"[\\s\\S]*?href=\".*?\"[\\s\\S]*?title=\".*?\"[\\s\\S]*?ata-lazy-src=\"(.*?)\"",
           }
         ]
       },

       {
         "name":"vidcontain",
         "content":[
           {
             "type":"regex",
             "nextScreen":"videoPlayer",
             "titles":"<div id=\"myElement[\\s\\S]*?file: \".*?\"()",
             "regex":"<div id=\"myElement[\\s\\S]*?file: \"(.*?)\"[\\s\\S]*?file: \'(.*?)\'",
             "links":"$1",
             "images":"http://www.livenewson.com$2",
             "filters":[
               {
                 "what":"titles",
                 "prefix":"PLAY"
               }
             ]
           }
         ]
       }

    ]
  }
}
 

streamwatcher2013

Active member
Oct 24, 2013
474
88
28
USA
For CNN try this:

Code:
{
  "comment":"simpleVID CNN News",
  "svChannel":{
    "name":"cnnnews",
    "version":"1.0",
    "title":"CNN News",
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
    "screens":[
      {
        "name":"main",
        "title":"CNN News USA",
        "link":"https://www.livenewswatch.com/cnn-news-usa.html",
        "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
        "content":[
        {
           "type":"dynamic",
           "nextScreen":"videoPlayer",
           "title":"CNN News USA",
           "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
           "regex":"<div id=\"myElement[\\s\\S]*?file: \"(h.*?)\"","link":"$1",
          }
        ]
      }
    ]
  }
}
 

DarkSky

Member
Apr 1, 2016
38
0
6
streamwatcher2013
your post from 11 not work is invalid can not add to the app

your post from 12 (CNN) the code will be added logo and link work but on playing stream its says error the same results from my post 6
 

streamwatcher2013

Active member
Oct 24, 2013
474
88
28
USA
I just downloaded all the pastebin's links and review one by one to see how it works. Don't know the player at the final call can redirect the m3u8 links, becasue the index.m3u8 will redirect to chunk_720.m3u8 link or something else
 

streamwatcher2013

Active member
Oct 24, 2013
474
88
28
USA
Could you try one more time for CNN?

Code:
{
  "comment":"simpleVID CNN News",
  "svChannel":{
    "name":"cnnnews",
    "version":"1.0",
    "title":"CNN News",
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
    "screens":[
      {
        "name":"main",
        "title":"CNN News USA",
        "link":"https://www.livenewswatch.com/cnn-news-usa.html",
        "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
        "content":[
        {
           "type":"dynamic",
           "nextScreen":"videoPlayer",
           "title":"CNN News USA",
           "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
           "link":"<div id=\"myElement[\\s\\S]*?file: \"(h.*?)\"",
           "filters":[
             {
               "what":"link",
               "from":"index",
               "to":"tracks-v1a1\/mono"
             }
           ]
         }
       ]
     }
   ]
 }
}
And the invalid error probably cause by the space between those lines. Hopefully the simpleVID can redirect the links. It is how it look to detect the bandwidth and assign the resolution video rate

Code:
#EXTM3U
#EXT-X-STREAM-INF:CLOSED-CAPTIONS=NONE,RESOLUTION=640x360,FRAME-RATE=59.000,CODECS="avc1.4d001f,mp4a.40.2",AVERAGE-BANDWIDTH=635853,BANDWIDTH=794816
tracks-v4a1/mono.m3u8
#EXT-X-STREAM-INF:CLOSED-CAPTIONS=NONE,RESOLUTION=854x480,FRAME-RATE=59.000,CODECS="avc1.4d001f,mp4a.40.2",AVERAGE-BANDWIDTH=949732,BANDWIDTH=1187165
tracks-v3a1/mono.m3u8
#EXT-X-STREAM-INF:CLOSED-CAPTIONS=NONE,RESOLUTION=1280x720,FRAME-RATE=59.000,CODECS="avc1.4d0020,mp4a.40.2",AVERAGE-BANDWIDTH=1263610,BANDWIDTH=1579512
tracks-v2a1/mono.m3u8
#EXT-X-STREAM-INF:CLOSED-CAPTIONS=NONE,RESOLUTION=1920x1080,FRAME-RATE=59.000,CODECS="avc1.4d002a,mp4a.40.2",AVERAGE-BANDWIDTH=2309871,BANDWIDTH=2887338
tracks-v1a1/mono.m3u8
Code:
{
  "comment":"simpleVID Live News Watch",
  "svChannel":{
    "name":"livenewswatch",
    "version":"1.0",
    "title":"Live News Watch",
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/07/1-300x64.png",
    "screens":[
      {
        "name":"main",
        "title":"Live News Watch",
        "link":"https://www.livenewswatch.com/",
        "image":"",
        "content":[
          {
            "type":"regex",
            "nextScreen":"vidcontain",
            "titles":"<div class=\"td-module-thumb\"[\\s\\S]*?href=\".*?\"[\\s\\S]*?title=\"(.*?)\"[\\s\\S]*?ata-lazy-src=\".*?\"",
            "links":"<div class=\"td-module-thumb\"[\\s\\S]*?href=\"(.*?)\"[\\s\\S]*?title=\".*?\"[\s\S]*?ata-lazy-src=\".*?\"",
            "images":"<div class=\"td-module-thumb\"[\\s\\S]*?href=\".*?\"[\\s\\S]*?title=\".*?\"[\\s\\S]*?ata-lazy-src=\"(.*?)\"",
           }
         ]
       },
       {
         "name":"vidcontain",
         "title":"Live News Watch",
         "content":[
           {
             "type":"regex",
             "nextScreen":"videoPlayer",
             "titles":"<div id=\"myElement[\\s\\S]*?file: \".*?\"()",
             "links":"<div id=\"myElement[\\s\\S]*?file: \"(h.*?)\"",
             "images":"",
             "filters":[
               {
                 "what":"titles",
                 "prefix":"PLAY"
               }
             ]
           }
         ]
       }
     ]
  }
}
 

DarkSky

Member
Apr 1, 2016
38
0
6
@stream watcher 2013 use this template

it is clean code i have tested it and works 100% valid

Code:
{
  "comment":"simpleVID popler.tv",
  "svChannel":{
    "name":"poplertv",
    "version":"1.0",
    "title":"popler.tv",
    "image":"http://www.popler.tv/oferta_new/images/logo.png",
    "screens":[
      {
        "name":"main",
        "title":"popler.tv",
        "link":"http://www.popler.tv",
        "image":"",
        "content":[
          {
            "type":"static",
            "nextScreen":"videoPlayer",
            "title":"4FUN TV",
            "link":"http://www.popler.tv/live/4funtv",
            "image":"http://www.popler.tv/avatars/9455.jpg",
            "videoPlayerRegex":"x-mpegurl\", src:.*?\"(http.*?)\""
          }
        ]
      }
    ]
  }
}






maybe you can do it the same with CNN news?

Code:
https://www.livenewswatch.com/cnn-news-usa.html
 

streamwatcher2013

Active member
Oct 24, 2013
474
88
28
USA
I think i saw the problem now. I put extra comma "," at the end of link or videoPlayerRegex. Please try again

Code:
{
  "comment":"simpleVID CNN News",
  "svChannel":{
    "name":"cnnnews",
    "version":"1.0",
    "title":"Live News Watch",
    "link":"https://www.livenewswatch.com/"
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/07/1-300x64.png",
    "screens":[
      {
        "name":"main",
        "title":"CNN News USA",
        "link":"https://www.livenewswatch.com/cnn-news-usa.html",
        "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
        "content":[
          {
            "type":"static",
            "nextScreen":"videoPlayer",
            "title":"CNN News USA",
            "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
            "videoPlayerRegex":"<div id=\"myElement[\\s\\S]*?file: \"(h.*?)\""
          }
        ]
      }
    ]
  }
}


{
  "comment":"simpleVID CNN News",
  "svChannel":{
    "name":"cnnnews",
    "version":"1.0",
    "title":"Live News Watch",
    "link":"https://www.livenewswatch.com/"
    "image":"https://www.livenewswatch.com/wp-content/uploads/2018/07/1-300x64.png",
    "screens":[
      {
        "name":"main",
        "title":"CNN News USA",
        "link":"https://www.livenewswatch.com/cnn-news-usa.html",
        "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
        "content":[
          {
            "type":"static",
            "nextScreen":"videoPlayer",
            "title":"CNN News USA",
            "image":"https://www.livenewswatch.com/wp-content/uploads/2018/05/cnn-356x220.jpg",
            "link":"<div id=\"myElement[\\s\\S]*?file: \"(h.*?)\""
          }
        ]
      }
    ]
  }
}
 

streamwatcher2013

Active member
Oct 24, 2013
474
88
28
USA
Try this with pastebin. I did read all it's info and example on reddit as well. It's simple coding only little bit different on the regex mode.

Code:
https://pastebin.com/raw/YdHkqNue
 

DarkSky

Member
Apr 1, 2016
38
0
6
It is difficult to understand why it is not accepted

it will not be added it says

could not find any valid data under given url

what does that mean?