LSP Regex & Makelist Discussion.

boomski2

Member
Aug 19, 2019
35
1
8
anyone have makelist for ok.ru site?

Code:
https://ok.ru/video/c2381276
 

peterpan

Active member
Jul 7, 2013
103
73
28
@boomski2 Sorry m8, getting all episodes together is a bit tricky (for me), so maybe @streamwatcher2013 or @gujal can code it for you in Python :)


XML:
<item>
<title>Diriliş "Ertuğrul" Season 2 - Indonesian Subs (Ep27- Ep37 minus Ep36)</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param2][/COLOR]</title>
<link>$doregex[PlayStream]</link>
]]></listrepeat>
<expres><![CDATA[openMovie\(&#39;(.*?)&.+?title="(.*?)"]]></expres>
<page>$doregex[getMainPage]</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>PlayStream</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,url='https://ok.ru/videoembed/[makelist.param1]'):
    import urlresolver
    u = urlresolver.resolve(url)
    return u
]]></expres>
<page></page>
</regex>
<regex>
<name>getMainPage</name>
<expres><![CDATA[(.*)]]></expres>
<page>https://ok.ru/video/c2381276?st.cmd=anonymVideo&amp;st.m=ALBUM&amp;st.aid=c2381276&amp;st.ft=album&amp;cmd=VideoAlbumBlock</page>
<rawpost>fetch=false&amp;st.page=3&amp;st.lastelem=$doregex[getLastElement]&amp;gwt.requested=$doregex[getRequested]</rawpost>
<referer>https://ok.ru/</referer>
<cookieJar>PHPSESSID=c7e9b197cd499efe7941e62e50e22f0d</cookieJar>
</regex>
<regex>
<name>getLastElement</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):
  lastelement=re.findall('data-last-element="(.*?)"',page_data)[0]
  return lastelement
]]></expres>
<page>https://ok.ru/video/c2381276</page>
</regex>
<regex>
<name>getRequested</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):
  req=re.findall('gwtHash:"(.*?)"',page_data)[0]
  return  rep
]]></expres>
<page>https://ok.ru/video/c2381276</page>
</regex>
</item>
XML:
<item>
<title>Diriliş "Ertuğrul" Season 2 - Indonesian Subs (Ep36-Ep61 minus Ep37)</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param2][/COLOR]</title>
<link>$doregex[PlayStream]</link>
]]></listrepeat>
<expres><![CDATA[openMovie\(&#39;(.*?)&.+?title="(.*?)"]]></expres>
<page>https://ok.ru/video/c2381276|Upgrade-Insecure-Requests=1</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>PlayStream</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,url='https://ok.ru/videoembed/[makelist.param1]'):
    import urlresolver
    u = urlresolver.resolve(url)
    return u
]]></expres>
<page></page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
Here u go. Use it with resolveurl


LSP XML code:
<item>
<title>Diriliş ''Ertuğrul'' Season 2</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param3][/COLOR]</title>
  <urlsolve>https://ok.ru/videoembed/[makelist.param2]</urlsolve>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  msource=re.findall('(?s)(gwtHash.*?)class=.navigation',page_data)[0].replace('amp;','')
  hash,plink,edata=re.findall('(?s)gwtHash:"([^"]+).+?data-url="/(video/c[^"]+).+?data-last-element="([^"]+)',msource)[0]
  list=re.findall('video-card_img-w".+?src="([^"]+).+?data-movie-id="([^"]+).+?title="([^-]+)',msource)
  for pn in range(2,4):
    data={'fetch':'false','st.page':str(pn),'st.lastelem':str(edata),'gwt.requested':str(hash)}
    source=requests.post('https://ok.ru/'+plink,headers={'user-agent':'Mozilla/5.0','host':'ok.ru','origin':'https://ok.ru','accept':'*/*'},data=data).content.replace('amp;','')
    list +=re.findall('video-card_img-w".+?src="([^"]+).+?data-movie-id="([^"]+).+?title="([^-]+)',source)
  return list
]]></expres>
<page>https://ok.ru/video/c2381276</page>
</regex>
</item>
 
  • Like
Reactions: peterpan

Doom

Member
Sep 16, 2019
155
20
18

peterpan

Active member
Jul 7, 2013
103
73
28
@Doom I believe you can only get a handful of open/free channels. The others require membership. Anyway, this is beyond my skill set. I'll let the experts chime in and help you out :)
 
  • Like
Reactions: Doom

peterpan

Active member
Jul 7, 2013
103
73
28
@tungbeng95 Here you go...

XML:
<item>
<title>**www.rtvs.sk/televizia/live-1**</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  source=requests.get('https://www.rtvs.sk/json/live5f.json?c=1&b=mozilla&p=win&v=77&f=1&d=1',cookies=Cookie_Jar,headers={'user-agent':'Mozilla/5.0','referer':'https://www.rtvs.sk/televizia/live-1','X-Requested-With':'XMLHttpRequest','Host':'www.rtvs.sk','accept':'*/*'}).content
  return re.findall('"(https.+.m3u8.+?)"',source)[0]+'|user-agent=iPad'
]]></expres>
<page></page>
<thumbnail>https://www.rtvs.sk/media/a501/image/file/12/0234/gwTJ.spravy_zvucka_jpg.jpg</thumbnail>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

altug

Member
Jul 7, 2016
48
2
8
I need help with this link, Thanks in advance

hxxps://www.ligotv4.com/tr
 

peterpan

Active member
Jul 7, 2013
103
73
28
@altug Here you go...

XML:
<item>
<title>BeIn Sports Canli</title>
<link>$doregex[getURL]</link>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 link = re.findall('atob."([^"]+)',page_data)[0].decode('base64')
 return re.findall("src: '([^']+)",link)[0]+'|user-agent=iPad'
]]></expres>
<page>https://www.ligotv4.com/tr/channel/bein-sport-1</page>
</regex>
</item>
 

peterpan

Active member
Jul 7, 2013
103
73
28
@altug Stream is sometimes unreliable. Try adding referer for it to work.
Replace the last line of the code with this:
Code:
return re.findall("src: '([^']+)",link)[0]+'|user-agent=iPad&referer=https://www.ligotv4.com/tr/channel/bein-sport-1'
 

adrianhn

New member
Mar 20, 2014
23
4
3
help with this .

Code:
<regex>
<name>url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  from resolveurl.plugins.lib import jsunpack
  import re, requests, urllib
  edata = re.findall('(eval\(function\(p,a,c,k,e,d.*)', page_data)[0]
  epage = jsunpack.unpack(edata).replace('\\', '')
  svar = re.findall('\(esMobiliar\)\s*{\s*(\w+)', epage)[0]
  server = re.findall('{}\s*=\s*"([^"]+)'.format(svar), epage)[0].decode('base64')
  tsvar, ttvar = re.findall('window\.atob\((.+?)\)\..*?atob\((.+?)\),', epage)[0]
  tserver = re.findall('{}\s*=\s*"([^"]+)'.format(tsvar), epage)[0].decode('base64')[13:]
  ttoken = re.findall('{}\s=\s\"(.+?)\"'.format(ttvar), epage)[0].decode('base64')
  turl = 'http://telerium.tv{}{}'.format(tserver,ttoken)
  headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27',
            'Referer': 'http://telerium.tv/',
            'X-Requested-With': 'XMLHttpRequest'}
  cookies = {
            'DelMarLaVi': '100', 'ChorreameLaJa': '100', 'setVolumeSize':'100', 'analyticsid':'100', 'volumecookievar':'100', 'CookieVolume':'100', 'elVolumen':'100', 'advertisingCookie':'100', 'analyticsCookie':'100', 'advertisingCookie':'100', 'playerVolumen':'100', 'playerXVolumex':'100', 'volume':'0', 'volumeVar':'100', 'volumex':'100', 'KodiamelaPiola':'100', 'CookieVolume':'100', 'elVolumen':'100', 'advertisingCookie':'100', 'analyticsCookie':'100', 'advertisingCookie':'100', 'analyticsCookie':'100'}
  token = requests.post(turl, headers=headers, cookies=cookies).json()[10][::-1]
  headers.pop('X-Requested-With')
  url='http:{}{}|{}'.format(server,token, urllib.urlencode(headers))
  return url
]]></expres>
<page>http://telerium.tv/embed/59725.html</page>
<referer>http://soloveo.com/espnhd.php</referer>
</regex>
 

tungbeng95

Member
Oct 25, 2018
181
7
18
I need help with this:
hxxps://www.afghanlive.tv/lemar-tv/
 

TRC4

New member
Mar 6, 2016
12
2
3
Netherland
Code:
For All Flussonic Player

<!--
EXAMPLE Flussonic Player Main Page
<p style="text-align: center;"><span style="color: #ff0000;"><strong>Please Wait For Few Seconds To Play The TV Or Tap Play!</strong></span></p>
<iframe frameborder='0' style='width: 100%; height: 450px;' allowfullscreen src='https://server/live/embed.html?token=fce56d64908b6ef066b3080bc3fbc6ba63390ee7-e7a80cf0f24464ea9135b375fb56495a-1593803447-1593796247
'></iframe>
-->
<item>
<title>Flussonic Player Main Page</title>
<thumbnail></thumbnail>
<fanart></fanart>
<link>$doregex[replace_url]</link>
<regex>
<name>replace_url</name>
<expres>$pyFunction:'$doregex[get_stream]'.replace('embed.html?token','index.m3u8?token')</expres>
<page></page>
</regex>
<regex>
<name>get_stream</name>
<expres>src='(http.*?embed.*?.*)</expres>
<page>http://server</page>
<referer>http://server</referer>
</regex>
</item>

<!--
EXAMPLE Flussonic Player Embed Code
<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class='embed-container'><iframe src='http://server/embed.html?dvr=false&token=fce56d64908b6ef066b3080bc3fbc6ba63390ee7-e7a80cf0f24464ea9135b375fb56495a-1593803447-1593796247
&version=2' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>
-->
<item>
<title>Flussonic Player Embed Code</title>
<thumbnail></thumbnail>
<fanart></fanart>
<link>$doregex[replace_url]</link>
<regex>
<name>replace_url</name>
<expres>$pyFunction:'$doregex[get_stream]'.replace('embed.html?dvr=false&amp;token','index.m3u8?token')</expres>
<page></page>
</regex>
<regex>
<name>get_stream</name>
<expres>iframe src='(http.*?embed.*?.*)</expres>
<page>http://server/embed.php</page>
<referer>http://server/embed.php</referer>
</regex>
</item>
 

peterpan

Active member
Jul 7, 2013
103
73
28
Here you go...

XML:
<item>
<title>**http://www.afghanlive.tv/lemar-tv/**</title>
<link>https://afghantv.live/lemar/index.m3u8?$doregex[getToken]|user-agent=iPad</link>
<regex>
<name>getToken</name>
<expres>allowfullscreen src='.*?(token=.*?)\n<expres>
<page>https://www.afghanlive.tv/lemar-tv/</page>
<thumbnail>https://sports24hour.com/wp-content/uploads/2017/04/Lemar-TV-live-online.jpg</thumbnail>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

tungbeng95

Member
Oct 25, 2018
181
7
18
@peterpan help me fix this:

<item>
<title>S-Sport 1</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
link=re.findall('iframe.+?src=[\'"](h[^\'"]+)',page_data)[0]
source=requests.get(link,headers={'user-agent':'Mozilla/5.0','host':'streamcdn.to','referer':'https://8.fixspor45.xyz/ch/ch7.php','accept':'*/*'},cookies=Cookie_Jar).content
stream=jsunpack.unpack(re.findall('(eval.*(?:m3u8|mp4).*)',source)[0])
return re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',stream)[0]+'|user-agent=ipad&referer='+link
]]></expres>
<page>https://8.fixspor45.xyz/ch/ch7.php</page>
</regex>
</item>
 

03stevensmi

Member
Sep 12, 2019
43
4
8
@streamwatcher2013
Hey man,
Sorry for not getting back sooner, been really busy.
i actually also discovered the same audrey json image issue in my own code over a week ago.
I could only got the poster to show up.

same with direct .cbr files.
I scrapped a ubooquity server and it displays the direct .cbr as poster image...
but doesn't work when selecting the source.
I tried making it an image plugin (non of the posters show up as well as same issues)
and a program plugin.

i also tried using the Super Favourites addon to change how it reads but with no success.

The only thing i can think of is audrey is used as video sources and video plugins and not image.

Have you tried regex this site for livestreamspro?
Does the same issue happen?
 

03stevensmi

Member
Sep 12, 2019
43
4
8
just another thing to note about this json... The exact same issue with the image happens with the site
(link remove do not post live links).

if it would be possible to regex viewcomics.me for livestreampro...
we should find out if the same thing happens. ;)
cheers!
 
Last edited by a moderator:

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
It may work for you. When open the next page make sure wait for few second to get the cache clear and get the right image

LSP XML Code:
<item>
<title>1001 Arabian Nights: The Adventures of Sinbad</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold]Page [makelist.param2] [COLOR dodgerblue] 1001 Arabian Nights: The Adventures of Sinbad[/COLOR]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  return re.findall('original="([^"]+).+?Page\s*(\d+)',re.findall('chapter-container">(?s)(.*?)</td',page_data)[0])
]]></expres>
<page>https://viewcomics.me/1001-arabian-nights-the-adventures-of-sinbad/issue-1/full</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,urllib,xbmc,xbmcaddon,xbmcplugin,xbmcgui,sys,os,time
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
#  xbmc.executebuiltin('Container.Refresh')
  image=xbmc.translatePath(xbmcaddon.Addon( ).getAddonInfo('path'))
  image=xbmc.translatePath(os.path.join(image,"jpg.png.gif"))
  urllib.urlretrieve('[makelist.param1]',image)
  postImage=xbmcgui.ControlImage(200,0,480,720,image,aspectRatio=2)
  displayimage=xbmcgui.WindowDialog();displayimage.addControl(postImage)
  displayimage.show()
  xbmc.sleep(8000) #.close()
  return displayimage.show()
]]></expres>
<page>https://viewcomics.me/1001-arabian-nights-the-adventures-of-sinbad/issue-1/full</page>
<NOTPlayable>True</NOTPlayable>
</regex>
<thumbnail>http://2.bp.blogspot.com/i5fwz-HMt5Qh8LC68gHsx7Y6yy0eZ8DmD3pvWGHUQxIkdu3dSK7DWsFAodObr_zgpxUvYjMyLUsV=s0</thumbnail>
</item>
 

papaya

Member
Apr 4, 2018
40
1
8
guys, anyone can update this? got from here, and now not able to play any

Code:
<item>
<title>HDSTREAM SPORT</title>
<thumbnail></thumbnail>   
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param3][COLOR dodgerblue] ([makelist.param2] | [makelist.param1])[/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail></thumbnail>
  <fanart></fanart>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  list=re.findall('<h2>(?s)(.*?)id=.comments',page_data)[0]
  gtitle=re.findall('\d+:\d+.+?&.+?>([^<]+)',list)
  for t in gtitle:
     title=t.title().strip()
     list=list.replace(t,title)
  data=re.findall('(\d+:\d+).+?>(.*?)\s*&.+?>([^<]+).+?href="([^"]+)',list)
  return data
]]></expres>
<page>http://hdstreams.club/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):# streamwatcher2013
  ref='[makelist.param4]';hUrl=ref.replace('hd/','page/')
  source=requests.get(hUrl,headers={'user-agent':'Mozilla/5.0','host':'hdstreams.club','referer':ref,'accept':'*/*'}).content
  return re.findall('window.atob.[\'"]([^\'"]+)',source)[0].decode('base64')+'|user-agent=ipad&referer='+hUrl
]]></expres>
<page></page>
</regex>
<fanart></fanart>
</item>
 

upd8t3r

Member
Oct 16, 2019
41
13
8
This should make most if not all links work. I could only test the active links and they all worked for me.


XML:
<item>
<title>[B]HDSTREAM SPORT[/B]</title>
<thumbnail>https://static.vecteezy.com/system/resources/thumbnails/000/125/499/small/sports-balls-vector.jpg</thumbnail> 
<fanart>https://static.vecteezy.com/system/resources/thumbnails/000/125/499/small/sports-balls-vector.jpg</fanart>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param3][COLOR dodgerblue] ([makelist.param2] | [makelist.param1])[/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>https://static.vecteezy.com/system/resources/thumbnails/000/125/499/small/sports-balls-vector.jpg</thumbnail>
  <fanart>https://static.vecteezy.com/system/resources/thumbnails/000/125/499/small/sports-balls-vector.jpg</fanart>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  list=re.findall('<h2>(?s)(.*?)id=.comments',page_data)[0]
  gtitle=re.findall('\d+:\d+.+?&.+?>([^<]+)',list)
  for t in gtitle:
     title=t.title().strip()
     list=list.replace(t,title)
  data=re.findall('(\d+:\d+).+?>(.*?)\s*&.+?>([^<]+).+?href="([^"]+)',list)
  return data
]]></expres>
<page>http://hdstreams.club/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):# streamwatcher2013
  ref='[makelist.param4]';hUrl=ref.replace('hd/','page/')
  page=requests.get(hUrl,headers={'user-agent':'Mozilla/5.0','host':'hdstreams.club','referer':ref,'accept':'*/*'}).content
  if 'm3u8' in page:
    return re.findall('source:\s*[\'"]([^\'"]+)',page)[0]+'|user-agent=ipad&referer='+hUrl
  else:
    return re.findall('window.atob.[\'"]([^\'"]+)',page)[0].decode('base64')+'|user-agent=ipad&referer='+hUrl
]]></expres>
<page></page>
</regex>
</item>
 

efradncr

Member
Mar 26, 2018
49
1
8
Will it be possible to make changes to this to load the list? @streamwatcher2013
Code:
<item>
<title>• [B][COLORlime]MATBET-7- [COLORdodgerblue]TV SPORT[/COLOR][/COLOR][/B][COLORgold] [I] [ENTRAR][/I][/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('channel-list">(?s)(.*?)</section',page_data)[0]
  return re.findall('"item.*\n.*href=[\'"]([^\'"]+)".title=[\'"]([^\'"]+)',list)
]]></expres>
<page>https://www.matbet74.tv/</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  url=re.findall('id="player"[\w\W]*?[\'"]([^\'"]+)',page_data)[0]
  source=requests.get(url,headers={'User=Agent':'Mozilla/5.0','Referer':'[makelist.param1]'}).content
  source=base64.b64decode(re.findall('id="player"[\w\W]*?atob\([\'"]([^\'"]+)',source)[0])
  return re.findall('source:[\'"]([^\'"]+)',source)[0]+'|User-Agent=Mozilla/5.0&Referer='+url
]]></expres>
<page>[makelist.param1]</page>
<referer>https://www./</referer>
<cookieJar></cookieJar>
</regex>
 

gujal

Developer
Dec 26, 2013
383
164
43
Enjoy!

LSP XML:
<item>
<title>Matbet 74</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param1]</title>
<slproxy>hls://[makelist.param3]|User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0&amp;Referer=https://www.matbet74.tv/&amp;Origin=https://www.matbet74.tv</slproxy>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re
  channels = re.findall('data-channel.+?data-stream="([^"]+).+?title="([^"]+).+?src="([^"]+)', page_data)
  lb = re.findall('data-loadbalancer="([^"]+)', page_data)[0]
  lbd = re.findall('data-loadbalancerdomain="([^"]+)', page_data)[0]
  channels = [(title, thumb, 'https://check.nlivecdn.com/d/{0}/{1}/{2}/1'.format(lb,cid,lbd))
              for cid, title, thumb in channels]
  return channels
]]></expres>
<page>https://www.matbet74.tv/</page>
</regex>
</item>
 
  • Like
Reactions: peterpan and altug

tungbeng95

Member
Oct 25, 2018
181
7
18
Hi.I need help this:
hxxps://nowagoal.com/embed/sporttv1.php
 

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
Here u go:

LSP XML code:
<item>
<title>Sport TV 1</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('iframe\s*src=[\'"]([^\'"]+)',page_data)[0]   #http://nowagoal.stream/sporttv1.html
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'http://nowagoal.com/embed/sporttv1.php','accept':'*/*'}).content
  url=re.findall('iframe\s*src=[\'"]([^\'"]+)',source)[0];url='https:'+url if url.startswith('//') else url
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':link,'accept':'*/*'}).content
  m3u8=jsunpack.unpack(re.findall('(eval.*(?:m3u8|mp4).*)',source)[0])
  return re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',m3u8)[0]+'|user-agent=Mozilla/5.0&referer='+url
]]></expres>
<page>http://nowagoal.com/embed/sporttv1.php</page>
<referer>http://nowagoal.com/</referer>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

Doom

Member
Sep 16, 2019
155
20
18
Last edited by a moderator:

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
Try this:

LSP XML Code:
<item>
<title>https://soccerlegacy.net/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR dodgerblue][makelist.param1] | [COLOR gold][makelist.param3] vs. [makelist.param4][COLOR snow] ([makelist.param2])[/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  return re.findall('"date":"2020-(.+?\d+:\d+):\d+.+?competition":"([^"]+).+?"home":"([^"]+).,"away":"([^"]+)',page_data)
]]></expres>
<page>https://soccerlegacy.net/api/schedule</page>
<referer>https://soccerlegacy.net/</referer>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  hteam='-'.join('[makelist.param3]'.lower().split());ateam='-'.join('[makelist.param4]'.lower().split())
  url='https://soccerlegacy.net/la-liga/%s-vs-%s'%(hteam,ateam)
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'https://soccerlegacy.net/','accept':'*/*'}).content
  link=re.findall('embed-responsive.+?src="([^"]+)',source)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':url,'accept':'*/*'}).content
  slink=re.findall('iframe\s*src="([^"]+)',source)[0]
  source=requests.get(slink,headers={'user-agent':'Mozilla/5.0','referer':link,'accept':'*/*'}).content
  m3u8=jsunpack.unpack(re.findall('(eval.*(?:m3u8|mp4).*)',source)[0])
  return re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',m3u8)[0]+'|user-agent=ipad&referer='+slink
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: Doom

peterpan

Active member
Jul 7, 2013
103
73
28
@Doom SW's Makelist works fine, but only for "La Liga" games. For example Fulham vs. Brentford won't work. You need to change the 1st & 2nd lines in the getUrl RegEx with this:

Code:
league='-'.join('[makelist.param2]'.lower().split());hteam='-'.join('[makelist.param3]'.lower().split());ateam='-'.join('[makelist.param4]'.lower().split())
url='https://soccerlegacy.net/%s/%s-vs-%s'%(league,hteam,ateam)
 
  • Like
Reactions: Doom

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
I think it will cover all for now. Last time doesn't have enough time to go thru. Thanks @peterpan for help

LSP XML Code:
<item>
<title>https://soccerlegacy.net/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR dodgerblue]([makelist.param1]) [COLOR gold][makelist.param3] vs. [makelist.param4][COLOR snow] ([makelist.param2])[/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  dates=re.findall('"date":"([^"]+)',page_data)
  for d in dates:
    ndate=d.replace('T',' | ')[5:-8]
    page_data=page_data.replace(d,ndate)
  return re.findall('"date":"([^"]+).,"competition":"([^"]+).+?"home":"([^"]+).,"away":"([^"]+)',page_data)
]]></expres>
<page>https://soccerlegacy.net/api/schedule</page>
<referer>https://soccerlegacy.net/</referer>
</regex>
<regex>
<name>Link</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  hteam='-'.join('[makelist.param3]'.lower().split());league='-'.join('[makelist.param2]'.lower().split())
  ateam='-'.join('[makelist.param4]'.lower().split())
  if len(ateam) >= 2:
    return 'https://soccerlegacy.net/%s/%s-vs-%s'%(league,hteam,ateam)
  else:
    return 'https://soccerlegacy.net/%s/%s'%(league,hteamm)
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('embed-responsive.+?src="([^"]+)',page_data)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'$doregex[Link]','accept':'*/*'}).content
  slink=re.findall('iframe\s*src="([^"]+)',source)[0]
  source=requests.get(slink,headers={'user-agent':'Mozilla/5.0','referer':link,'accept':'*/*'}).content
  m3u8=jsunpack.unpack(re.findall('(eval.*(?:m3u8|mp4).*)',source)[0])
  return re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',m3u8)[0]+'|user-agent=ipad&referer='+slink
]]></expres>
<page>$doregex[Link]</page>
<referer>https://soccerlegacy.net/</referer>
</regex>
</item>
 
  • Like
Reactions: Doom and peterpan

gujal

Developer
Dec 26, 2013
383
164
43
The above code still has an issue with UFC events. Here is the correct code and also displaying the schedule in local time ;)
Enjoy!

LSP XML:
<item>
<title>https://soccerlegacy.net/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR dodgerblue][makelist.param1] [COLOR snow][I][makelist.param2][/I][COLOR gold] [makelist.param3][/COLOR]</title>
  <link>$doregex[getUrl]|User-Agent=iPad</link>
  <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import json, time
  from datetime import datetime, timedelta
  jd = json.loads(page_data)
  events = []
  for event in jd.get('events'):
    date = datetime.strptime(event.get('date'), "%Y-%m-%dT%H:%M:%S.000Z")
    date = date - timedelta(seconds=time.timezone)
    ecomp = event.get('competition')
    etitle = event.get('teams').get('home')
    if event.get('teams').get('away', False):
      etitle += ' vs {0}'.format(event.get('teams').get('away'))
    events.append((date.strftime('%d %B %I:%M%p'), ecomp, etitle, event.get('channel')))
  return events
]]></expres>
<page>https://soccerlegacy.net/api/schedule</page>
<referer>https://soccerlegacy.net/</referer>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, jsunpack
  pdata = re.search('(eval\(function\(p,a,c,k,e.+?)</script', page_data, re.DOTALL)
  if pdata:
    page_data += jsunpack.unpack(pdata.group(1))
  strurl = re.findall(r'''player\.src.+?(?:src|source|file):\s*['"]([^'"]+)''', page_data, re.DOTALL)[0]
  return strurl
]]></expres>
<page>$doregex[embed]</page>
<referer>https://shub23.net/</referer>
</regex>
<regex>
<name>embed</name>
<expres><![CDATA[<iframe\s*src="([^"]+)]]></expres>
<page>https://shub23.net/soccerlegacy.php?ch=[makelist.param4]&amp;player=wstream</page>
<referer>https://soccerlegacy.net/</referer>
</regex>
</item>
 
  • Like
Reactions: Doom

gujal

Developer
Dec 26, 2013
383
164
43
Was busy porting ResolveURL to Kodi Matrix, so wasn't around here much

Just noticed that some of the servers that wstream uses dont have a valid cert, change the <link> line to below and it will bypass cert failures
Code:
<link>$doregex[getUrl]|User-Agent=iPad&amp;verifypeer=false</link>
 
  • Like
Reactions: Doom

Doom

Member
Sep 16, 2019
155
20
18
@gujal changed the last line fixed <link> and the makelist dosen't load... the original code does work can you look a at it again!
 

DarkSky

Member
Apr 1, 2016
42
0
6
no longer works :-(
can someone fix this again?


Code:
<item>
<title>cnncartoon-network</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests, unwise
  source = requests.get('https://www.canlitv.today/yayinim.php?kanal=cartoon-network', headers={'user-agent':'Mozilla/5.0','referer':'https://www.canlitv.today/'}).text
  while 'w,i,s,e' in source:
    source=unwise.unwise_process(source)
  link = re.findall('attr\("src", "(.*?)"',source, re.DOTALL)[0]
  return link
]]></expres>
<page></page>
</regex>
</item>
 

peterpan

Active member
Jul 7, 2013
103
73
28
@DarkSky Here you go m8...I'm sure @streamwatcher2013 can do it more eloquently with Python. I was problems with "unwise.unwise_process(source)", so I reverted to an old RegEx "unwise" function :)

XML:
<item>
<title>Cartoon-Network **https://www.canlitv.today/cartoon-network**</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<regex>
<name>getUrl</name>
<expres>file:.'(.*?)'</expres>
<page>$doregex[getUnwisedCode]</page>
</regex>
<regex>
<name>getUnwisedCode</name>
<expres>$pyFunction:get_unwise("$doregex[getWisedCode]").replace('.m3u8','720.m3u8')</expres>
<page></page>
</regex>
<regex>
<name>getWisedCode</name>
<expres>eval.*?.join.*\((.*?')\)</expres>
<page>https://www.canlitv.today/yayinim.php?kanal=cartoon-network</page>
<referer>https://www.canlitv.today/cartoon-network</referer>
<agent>Mozilla/5.0 (Windows NT 6.3; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0</agent>
<cookieJar></cookieJar>
</regex>
</item>
 

peterpan

Active member
Jul 7, 2013
103
73
28
And here's the Python version... :)
XML:
<item>
<title>cartoon-network</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests, unwise
  source = requests.get('https://www.canlitv.today/yayinim.php?kanal=cartoon-network', headers={'user-agent':'Mozilla/5.0','referer':'https://www.canlitv.today/cartoon-network','Upgrade-Insecure-Requests':'1'}).text
  #while 'w,i,s,e' in source:
  source=unwise.unwise_process(source)
  return source
  #link = re.findall("file:.'(.*?)'",source)[0]
  #return source
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: altug and DarkSky

Doom

Member
Sep 16, 2019
155
20
18
Need help... link plays in Android m3u players, but I get error403 in LSP. Is there a way to make it work & thanks!
hxxp://stream-e30453a4b.nmbs.top/m3u/Sports/0349462cac.m3u8
 

peterpan

Active member
Jul 7, 2013
103
73
28
@Doom Here you go...

XML:
<item>
<title>Static Astro Sport</title>
<link>http://stream-e30453a4b.nmbs.top/m3u/Sports/0349462cac.m3u8|User-Agent=VLC</link>
</item>
 
  • Like
Reactions: Doom

papaya

Member
Apr 4, 2018
40
1
8
hi guys, anyone got makelist regex for this side? many thanks

Code:
https://sports24.club/soccer.php
 

peterpan

Active member
Jul 7, 2013
103
73
28
@papaya Here you go...This one plays most English and Spanish links, but not French streams. It's not perfect, as I'm just learning to code, but I'm sure some of the Gurus here can post a better and more efficient one :)

XML:
<item>
<title>SOCCER.PHP **http://sports24.club/soccer.php/**</title>
<thumbnail>https://i.vimeocdn.com/portrait/5110937_300x300</thumbnail>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param1][makelist.param2][/COLOR]</title>
<link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
 list = re.findall('<div class="btn.*?>(?s).+?class="card-text">\s{8}(.+?)( -.*?)\n.*?href="(.*?)"',page_data)
 return list
]]></expres>
<page>http://sports24.club/soccer.php/</page>
</regex>
<regex>
<name>getUrl</name>
<listrepeat><![CDATA[
<title>[makelist.param1] - [COLOR gold][getUrl.param2][/COLOR]</title>
<link>$doregex[PlayStream]</link>
<thumbnail>https://i.vimeocdn.com/portrait/5110937_300x300</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
 game = '[makelist.param1]'
 link = 'https://sports24.club/soccer/'+'-'.join('[makelist.param1]'.lower().split()).replace('.','')
 php = re.findall('href="(\/soc.*?php)',page_data)[0]
 source = requests.get('http://sports24.club'+php, headers={'user-agent':'Mozilla/5.0','accept':'*/*'}).content
 servers = re.findall('href=".soccer.*?(\/.*?html)"(?s).+?i>.(.*?)<',re.findall('%s(?s)(.*?)rel="nofollow"'%game,source)[0])
 return servers
]]></expres>
<page>http://sports24.club</page>
<thumbnail>https://i.vimeocdn.com/portrait/5110937_300x300</thumbnail>
</regex>
<regex>
<name>PlayStream</name>
<expres><![CDATA[#$pyFunction
import re,requests,xbmcgui
def GetLSProData(page_data,Cookie_Jar,m):
 source = requests.get('https://sports24.club/soccer'+'[getUrl.param1]',headers={'user-agent':'Mozilla/5.0'}).content
 if 'atob' in source:
    url = re.findall("xurl\s*=\s*atob\('(.*?)'",source)[0].decode('base64').replace('https://','').replace('//','');url='sports24.club'+url if url.startswith('/') else url
    return 'https://'+url+'|user-agent=iPad&referer=https://sports24.club/'
 else:
    l1="Message from Peterpan"; l2="A Bit Too Hard For Me To Decode!"
    return xbmcgui.Dialog().ok(l1,l2)
]]></expres>
<page></page>
</regex>
</item>
 

m5Germany

Member
Mar 20, 2014
45
9
8
Happy Fathers' Day to All Fathers',
Looked at the following site. I can see the .mp4 - but - I think that the page does some kind of refresh to allow the next .mp4 to play and do not have the knowledge to CODE.
URL:
https://reboot.tube/s/americandad

https://tko.reboot.tube/AmericanDad/S15E19TopOfTheSteve.mp4
Thanks in advance,
m5
 

gujal

Developer
Dec 26, 2013
383
164
43
reboot.tube is an offshoot of arconai tv and their primary coding principle was that it should not work in Kodi!
So can't do anything about it :)
 
  • Like
Reactions: m5Germany

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
@gujal

Even it is their primary coding principle. I willing to see if we possiblely can get this site coding for fun. Not so sure but seem like they are using socked.io for real time updating the stream. I stuck on yeast encode for timestamp which been changed on every requests get and post links, also the strange feeding data to websock server thru socked.io post request for handshake.

XML:
1/ Get Socked.io url
https://reboot.tube/socketconfig/americandad.json

{"servers":[{"url":"https://reboot.tube:8443","secure":true},{"url":"http://reboot.tube:1337","secure":false}]}

2/ Yeast encode timestamp   "t=NBS-foD"  ????? . Try to use base64.b64encode(epoctime) but the result come out is longer.

3/ Socked ID we can get from here
https://reboot.tube:8443/socket.io/?EIO=3&transport=polling&t=NBS-foD

98:0{"sid":"81mNSfNWQLwSTMiXAJI5","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":120000}

4/ Requests.post link
https://reboot.tube:8443/socket.io/?EIO=3&transport=polling&t=NBS-fuX&sid=81mNSfNWQLwSTMiXAJI5

post data: 40:42['joinChannel',{'name':'americandad'}   ?????????

5/Final link contains a mp4 playable stream
https://reboot.tube:8443/socket.io/?EIO=3&transport=polling&t=NBS-fuc&sid=81mNSfNWQLwSTMiXAJI5

70:42["setPlaylistMeta",{"count":334,"rawTime":346847,"time":"96:20:47"}]19:42["setCurrent",64]260:42["changeMedia",{"id":"https://tko.reboot.tube/AmericanDad/S04E11OedipalPanties.mp4","title":"S04E11 Oedipal Panties","seconds":1269,"duration":"21:09","type":"fi","meta":{"codec":"mov/h264","bitrate":490.465},"currentTime":1008.2019999999967,"paused":false}]

"changeMedia",{"id":"https://tko.reboot.tube/AmericanDad/S04E11OedipalPanties.mp4"
 

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
With American Dad can do the little trick to play but not apply for all

XML:
<item>
<title>American Dad</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  tok1,tok2=re.findall('href.+?>(Ameri[^\(<]+).+\n.*\n.+?>([^<]+)',page_data)[0]
  return 'https://tko.reboot.tube/%s/%s.mp4'%(tok1.replace(' ',''),tok2.replace(' ',''))
]]></expres>
<page>https://reboot.tube/</page>
</regex
</item>
 

gujal

Developer
Dec 26, 2013
383
164
43
You can see that after jumping through all the hoops you get an mp4 for a single episode, it will play the episode from start to finish and then stop. Where as the website gives you an illusion of 24x7 playback
 
Thread starter Similar threads Forum Replies Date
J Scraper Development 0
D Apple TV 4 44
O Addon Requests 5