LSP Regex & Makelist Discussion.

tobotminer

Member
Jan 26, 2018
44
4
8
hi master here, anyone can help me with this

Code:
https://dubsports.to/channels?channel=a51fa9bcb5804c1f8744ee967ef9b49b
 

upd8t3r

Member
Oct 16, 2019
41
13
8
This is a different site than the one in post 786. This site is using sling tv streams, so there's no way of it getting it to work. The mpd links require extra authentication information that you can't get.
 

DerWolf

Member
Nov 20, 2019
38
5
8
is possible live webcam on lsp to see?


hxxps://www.skylinewebcams.com/de/top-live-cams.html
 

gujal

Developer
Dec 26, 2013
383
165
43
it is named "LivestreamsPro" for this reason ;)
Enjoy!


LSP XML:
<item>
<title>Skyline Webcams</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param3][/COLOR]</title>
<link>$doregex[PlayStream]|User-Agent=iPad</link>
<thumbnail>[makelist.param2]</thumbnail>
<info>[makelist.param4]</info>
]]></listrepeat>
<expres><![CDATA[class="webcam"><a\s*href="([^"]+).+?data-original="([^"]+).+?title">([^<]+).+?tion">([^<]+)]]></expres>
<page>https://www.skylinewebcams.com/de/top-live-cams.html</page>
</regex>
<regex>
<name>PlayStream</name>
<expres>source:\s*"([^"]+)</expres>
<page>https://www.skylinewebcams.com[makelist.param1]</page>
<referer>https://www.skylinewebcams.com/</referer>
</regex>
</item>
 
  • Like
Reactions: DerWolf and turko03

gujal

Developer
Dec 26, 2013
383
165
43
The regex needs a filter as there a couple of bogus links on the page. This is the corrected code

LSP XML:
<item>
<title>Skyline Webcams</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param3][/COLOR]</title>
<link>$doregex[PlayStream]|User-Agent=iPad</link>
<thumbnail>[makelist.param2]</thumbnail>
<info>[makelist.param4]</info>
]]></listrepeat>
<expres><![CDATA[class="webcam"><a\s*href="(?!#)([^"]+).+?data-original="([^"]+).+?title">([^<]+).+?tion">([^<]+)]]></expres>
<page>https://www.skylinewebcams.com/de/top-live-cams.html</page>
</regex>
<regex>
<name>PlayStream</name>
<expres>source:\s*"([^"]+)</expres>
<page>https://www.skylinewebcams.com[makelist.param1]</page>
<referer>https://www.skylinewebcams.com/</referer>
</regex>
</item>
 
  • Like
Reactions: DerWolf and turko03

tungbeng95

Member
Oct 25, 2018
181
7
18
I want to help with this:
hxxp://www.omegatv.com.cy/live/?cs=1
 
  • Like
Reactions: DerWolf

upd8t3r

Member
Oct 16, 2019
41
13
8
This worked for me.

XML:
<item>
<title>Omega TV</title>
<link>$doregex[link]|User-Agent=iPad&amp;Referer=http://www.omegatv.com.cy/live/?cs=1&amp;Connection=keep-alive</link>
<thumbnail>http://www.omegatv.com.cy/apple-touch-icon-144x144.png</thumbnail>
<fanart>http://www.omegatv.com.cy/apple-touch-icon-144x144.png</fanart>
<regex>
<name>link</name>
<expres>src":\s*"([^"]+)</expres>
<page>http://www.omegatv.com.cy/live/?cs=1</page>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

upd8t3r

Member
Oct 16, 2019
41
13
8
This is where they hide the full link, I just don't know how to scrape an aspx page. Maybe someone else who knows can help with finishing it.

Code:
https://www.ant1.com.cy/ajax.aspx?m=Atcom.Sites.Ant1iwo.Modules.TokenGenerator&videoURL=https://l2.cloudskep.com/antl2/abr/playlist.m3u8
 
  • Like
Reactions: tungbeng95

gladio

New member
Oct 14, 2018
14
0
1
Can you make this page regex .. Thanks
 

gujal

Developer
Dec 26, 2013
383
165
43
That channel is currenlty not broadcasting, but the code is below, the same code works for other channels on the site such as FTV

LSP XML:
<item>
<title>Fashion TV</title>
<thumbnail>https://spbtv.online/tafiimage_china/list_new/logo/fashion-tv.png</thumbnail>
<link>$doregex[getURL]</link>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0',
             'Referer': 'https://spbtv.online/'}
  eurl = re.findall('<iframe.+?src="([^"]+)', page_data)[0]
  epage = requests.get(eurl, headers=headers).text
  cid = re.findall("channelId:'([^']+)", epage)[0]
  apiurl = 'https://api-cn.spbtv.com/v1/channels/{0}/stream.json?client_id=355de73b-ccd8-46a7-bd23-ea3d65d77f41&client_version=2.0.0.362&timezone=43200&locale=en-US&protocol=hls&video_codec=h264&audio_codec=mp4a&drm=spbtvcas&screen_width=1920&screen_height=1200&device_token=14b2bd3d-1ea0-45d1-89f2-219a7eeb501a'.format(cid)
  spage = requests.get(apiurl, headers=headers).json()
  return spage.get('data').get('url')
]]></expres>
<page>https://spbtv.online/channels/fashion_tv.html</page>
</regex>
</item>

<item>
<title>DJ Central</title>
<thumbnail>https://spbtv.online/tafiimage_china/list_new/logo/dj-central-tv.png</thumbnail>
<link>$doregex[getURL]</link>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0',
             'Referer': 'https://spbtv.online/'}
  eurl = re.findall('<iframe.+?src="([^"]+)', page_data)[0]
  epage = requests.get(eurl, headers=headers).text
  cid = re.findall("channelId:'([^']+)", epage)[0]
  apiurl = 'https://api-cn.spbtv.com/v1/channels/{0}/stream.json?client_id=355de73b-ccd8-46a7-bd23-ea3d65d77f41&client_version=2.0.0.362&timezone=43200&locale=en-US&protocol=hls&video_codec=h264&audio_codec=mp4a&drm=spbtvcas&screen_width=1920&screen_height=1200&device_token=14b2bd3d-1ea0-45d1-89f2-219a7eeb501a'.format(cid)
  spage = requests.get(apiurl, headers=headers).json()
  return spage.get('data').get('url')
]]></expres>
<page>https://spbtv.online/channels/dj_central_tv.html</page>
</regex>
</item>
 
  • Like
Reactions: gladio

tungbeng95

Member
Oct 25, 2018
181
7
18
Can you help me with this: hxxps://aovivo.gratis/assistir-sony-ao-vivo/
 

03stevensmi

Member
Sep 12, 2019
43
4
8
@streamwatcher2013 Hey streamwatcher,
Its me again bro.
Could you do me a quick favour?
Could you fix this xml for kimcartoon please?
Cheers
Code:
<item>
<title>http://kimcartoon.to/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2][/COLOR]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>https://kimcartoon.to/Content/images/logo.png</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,cfscrape
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  scraper=cfscrape.create_scraper();source=scraper.get('https://kimcartoon.to/CartoonList').content.decode('ascii','ignore')
  return re.findall('href="/(.+?/([^"]+))',re.findall('genres</div>(?s)(.*?)id="leftside',source)[0])
]]></expres>
<page></page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist2.param2][/COLOR]  ([makelist2.param3])</title>
  <link>$doregex[makelist3]</link>
  <thumbnail>https://kimcartoon.to/Content/images/logo.png</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,cfscrape
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  scraper=cfscrape.create_scraper()
  list=scraper.get('https://kimcartoon.to/[makelist.param1]',headers={'user-agent':'Mozilla/5.0','referer':'http://kimcartoon.to/CartoonList'}).content
  if '?page' in list:
    count=2;pn=1;data=[]
    while pn <= int(count):
      page='https://kimcartoon.to/[makelist.param1]?page='+str(pn);source=scraper.get(page,headers={'user-agent':'Mozilla/5.0','referer':'http://kimcartoon.to/CartoonList'}).content
      data +=re.findall('(?s)class="item".+?href="/([^"]+).+?title="([^"]+).+?"textWhite">([^<]+)',source);pn +=1
    return data
  elif '?page' not in list:
    return re.findall('(?s)class="item".+?href="/([^"]+).+?title="([^"]+).+?"textWhite">([^<]+)',list)
]]></expres>
<page></page>
</regex>
<regex>
<name>makelist3</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist2.param2][/COLOR] (Server [makelist3.param2])</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>https://kimcartoon.to/Content/images/logo.png</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,cfscrape
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  scraper=cfscrape.create_scraper()
  source=scraper.get('https://kimcartoon.to/[makelist2.param1]',headers={'user-agent':'Mozilla/5.0'}).content
  url='https://kimcartoon.to/'+re.findall('href.+?/(.+?id=[^"]+)',source)[0]
  source=scraper.get(url,headers={'user-agent':'Mozilla/5.0','referer':'https://kimcartoon.to/[makelist2.param1]'}).content
  return re.findall('href.+?/(.+?id=[^"]+).>([F|R][^<]+)',source)
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,cfscrape
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  scraper=cfscrape.create_scraper()
  serv='[makelist3.param1]'
  source=scraper.get('https://kimcartoon.to/[makelist3.param1]',headers={'user-agent':'Mozilla/5.0','referer':'https://kimcartoon.to/[makelist2.param1]'}).content
  if 'fe' in serv:
    url=re.findall('id=.mVideo[\w\W]*?(?:src|file)=[\'"]([^\'"]+)',source)[0].replace('v/','api/source/')
    list=scraper.post(url,headers={'user-agent':'Mozilla/5.0','x-requested-with':'XMLHttpRequest','accept':'*/*'},data={'r':'','d':'www.luxubu.review'}).content
    if '1080' in list:
      return re.findall('.+file":"([^"]+).+?"1080',re.findall('"data"(.*)',list)[0].replace('\\',''))[0]
    elif '720' in list:
      return re.findall('.+file":"([^"]+).+?"720',re.findall('"data"(.*)',list)[0].replace('\\',''))[0]
    else:
      return re.findall('.+file":"([^"]+).+?"480',re.findall('"data"(.*)',list)[0].replace('\\',''))[0]
  else:
    url=re.findall('id=.mVideo[\w\W]*?(?:src|file)=[\'"]([^\'"]+)',source)[0]
    list=scraper.get(url,headers={'user-agent':'Mozilla/5.0','accept':'*/*'}).content
    if '1080' in list:
      return re.findall('src="([^"]+).+?1080',re.findall('id=.videojs(?s)(.*?)</video',list)[0])[0]
    elif '720' in list:
      return re.findall('src="([^"]+).+?720',re.findall('id=.videojs(?s)(.*?)</video',list)[0])[0]
    else:
      return re.findall('src="([^"]+).+?480',re.findall('id=.videojs(?s)(.*?)</video',list)[0])[0]
]]></expres>
<page></page>
</regex>
<thumbnail>http://kimcartoon.to/Content/images/logo.png</thumbnail>
</item>
 

tungbeng95

Member
Oct 25, 2018
181
7
18
Can help me this link working on LSP?
Link: hxxps://cdn.cvattv.com.ar/live/c3eds/FoxActionHD/SA_Live_dash_enc_2A/FoxActionHD.mpd
Source: hxxps://televisionlibre.net/canal/fox-premium-action-en-vivo/
Tks.
 

gujal

Developer
Dec 26, 2013
383
165
43
It is a widevine protected stream and the license server is not issuing a license even on the website, so can't do much unless the stream works first on the website
 

gujal

Developer
Dec 26, 2013
383
165
43
if you only share the final url, it is useless as one cant determine what headers are required. Give the webpage where it plays, then at least one can figure out
 

gujal

Developer
Dec 26, 2013
383
165
43
Okay with some guess work, here is the working code. Next time give the webpage, and also post links inside code tags, not url tags or directly, and when you post inside code tags, no need to replace http with hxxp

LSP XML:
<item>
<title>ANT 1</title>
<link>$doregex[get-url]|Referer=https://www.ant1.com/&amp;User-Agent=iPad</link>
<regex>
<name>get-url</name>
<expres>(.*)</expres>
<page>https://www.ant1.com.cy/ajax.aspx?m=Atcom.Sites.Ant1iwo.Modules.TokenGenerator&amp;videoURL=https://l2.cloudskep.com/antl2/abr/playlist.m3u8</page>
</regex>
</item>
 
  • Like
Reactions: tungbeng95 and KayD

Doom

Member
Sep 16, 2019
155
20
18

gujal

Developer
Dec 26, 2013
383
165
43
It is just 9 static m3u8 files for the possible 9 NFL/NBA/NHL channels there
https://1da9sm33.com/hls/n1.m3u8|Referer=https://mazymedias.com/ Just change n1 to n2 till n9 for the others
And for soccer channels, replace n1 with s1 till s9
 
  • Like
Reactions: Doom

gladio

New member
Oct 14, 2018
14
0
1
Can you make this page regex .. Thanks url change every day

 

gladio

New member
Oct 14, 2018
14
0
1
 

gujal

Developer
Dec 26, 2013
383
165
43
Enjoy!

LSP XML:
<item>
<title>CH Music TV</title>
<thumbnail>https://www.chmusic.tv/uploads/custom-logo.png</thumbnail>
<link>$doregex[getURL]|Referer=https://www.tikilive.com/&amp;User-Agent=iPad</link>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,cid="36199"):
  import re, requests
  s = requests.session()
  url = "https://www.tikilive.com/embed?scheme=embedChannel&channelId={0}".format(cid)
  s.headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'}
  page = s.get(url)
  keyid = re.findall(r"keyId:\s*'([^']+)", page.text)[0]
  turl1 = "https://tikilive.com:8080/socket.io/?c={0}&transport=polling&n=TIKISESSID&i={1}".format(cid, keyid)
  s.headers.update({'Origin': 'https://www.tikilive.com', 'Referer': 'https://www.tikilive.com/'})
  tpage = s.get(turl1)
  sid = re.findall(r'sid":"([^"]+)', tpage.text)[0]
  turl2 = "https://tikilive.com:8080/socket.io/?c={0}&transport=polling&n=TIKISESSID&i={1}&sid={2}".format(cid, keyid, sid)
  tpage2 = s.get(turl2)
  token = re.findall(r'id":"([^"]+)', tpage2.text)[0]
  strurl = re.findall(r'hls":"([^"]+)', tpage2.text)[0].replace("#token#", token)
  return strurl
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: gladio

gujal

Developer
Dec 26, 2013
383
165
43
Enjoy Rocklabel TV too, identical code!

LSP XML:
<item>
<title>Rock Label TV</title>
<thumbnail>https://www.rocklabel.tv/uploads/custom-logo.png</thumbnail>
<link>$doregex[getURL]|Referer=https://www.tikilive.com/&amp;User-Agent=iPad</link>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,cid="36198"):
  import re, requests
  s = requests.session()
  url = "https://www.tikilive.com/embed?scheme=embedChannel&channelId={0}".format(cid)
  s.headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'}
  page = s.get(url)
  keyid = re.findall(r"keyId:\s*'([^']+)", page.text)[0]
  turl1 = "https://tikilive.com:8080/socket.io/?c={0}&transport=polling&n=TIKISESSID&i={1}".format(cid, keyid)
  s.headers.update({'Origin': 'https://www.tikilive.com', 'Referer': 'https://www.tikilive.com/'})
  tpage = s.get(turl1)
  sid = re.findall(r'sid":"([^"]+)', tpage.text)[0]
  turl2 = "https://tikilive.com:8080/socket.io/?c={0}&transport=polling&n=TIKISESSID&i={1}&sid={2}".format(cid, keyid, sid)
  tpage2 = s.get(turl2)
  token = re.findall(r'id":"([^"]+)', tpage2.text)[0]
  strurl = re.findall(r'hls":"([^"]+)', tpage2.text)[0].replace("#token#", token)
  return strurl
]]></expres>
<page></page>
</regex>
</item>
 

tungbeng95

Member
Oct 25, 2018
181
7
18
Can you help me this:
hxxp://photocall.tv/h7b3/spi?ch=premium
Session h7b3 always change,can be Zn4J,Zn7b,...
 

gujal

Developer
Dec 26, 2013
383
165
43
wow, just two posts above you promised that you wont do this crap of posting final links with no main webpage, and also still not posting links inside code blocks. Sorry, you are on my ignorelist from now on
 
  • Like
Reactions: makal

peterpan

Active member
Jul 7, 2013
105
75
28
@tungbeng95 You must adhere to to what @gujal asked you to do. Here's the channel you've asked for, but you must be in Italy (w/ Italian IP address) to play it


Code:
<item>
<title>Rai Premium HD</title>
<link>http://photocall.tv/$doregex[playStream]|User-Agent=iPad</link>
<regex>
<name>playStream</name>
<expres>a href="(.*?rai\?ch=premium)".target="_blank">Premium</expres>
<page>http://photocall.tv/</page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
736
276
63
USA
@tungbeng95
You should use inline code to post your links. For advance code should choose XML for Language See image


If the link need the referer origin url which cause redirect link then post with it.


http://photocall.tv/h7b3/spi?ch=premium
origin url: http://photocall.tv/



Here the SPI Premium channel & whole channels belong to SPI

LSP XML Code:
<item>
<title>SPI International Premium HD</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  s=requests.get('http://photocall.tv/',headers={'user-agent':'Mozilla/5.0','accept':'*/*'})
  link='http://photocall.tv/'+re.findall('href="(.+?spi\?ch=premium)"',s.content)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','host':'photocall.tv','referer':'http://photocall.tv/','accept':'*/*'},cookies=s.cookies).content
  stream=re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',source)[0];stream='https:'+stream if stream.startswith('//') else stream
  return stream+'|user-agent=ipad&referer='+link
]]></expres>
<page></page>
</regex>
</item>

<item>
<title>SPI International Channels</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):#streamwatcher2013
  return re.findall('href="([^"]+).+?>([^<]+)',re.findall('SPI\s*International(?s)(.*?)</ul',page_data)[0])
]]></expres>
<page>http://photocall.tv/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  s=requests.get('http://photocall.tv/',headers={'user-agent':'Mozilla/5.0','accept':'*/*'})
  source=requests.get('http://photocall.tv/[makelist.param1]',headers={'user-agent':'Mozilla/5.0','host':'photocall.tv','referer':'http://photocall.tv/','accept':'*/*'},cookies=s.cookies).content
  stream=re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',source)[0];stream='https:'+stream if stream.startswith('//') else stream
  return stream+'|user-agent=ipad&referer=http://photocall.tv/[makelist.param1]'
]]></expres>
<page></page>
</regex>
</item>
 
Last edited:

dantas1990

Member
Apr 10, 2020
32
1
8
Boa noite. Como faço para converter isso?

\ x3d \ x38 \ x69 \ x64 \ x30 \ x78 \ x57 \ x61 \ x36 \ x46 \ x6d \ x63 \ x69 \ x39 \ x53 \ x63 \ x6e \ x35 \ x43 \ x64 \ x7a \ x39 \ x47 \ x61 \ x7a \ x64 \ x32 \ x4c \ x76 \ x6f \ x44 \ x63 \ x30 \ x52 \ x48 \ x61
 

streamwatcher2013

Well-known member
Oct 24, 2013
736
276
63
USA
It need to base64 convert after that. Final is;

Code:
http://gshost.gq/braziltv/
LSP XML Code:
<item>
<title>http://gshost.gq/braziltv/</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,urllib
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  text=urllib.unquote('\x3d\x38\x69\x64\x30\x78\x57\x61\x36\x46\x6d\x63\x69\x39\x53\x63\x6e\x35\x43\x64\x7a\x39\x47\x61\x7a\x64\x32\x4c\x76\x6f\x44\x63\x30\x52\x48\x61')
  return text[::-1].decode('base64')
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: dantas1990

peterpan

Active member
Jul 7, 2013
105
75
28
@dantas1990

Code:
<item>
<title>Decode</title>
<link>$doregex[CODE]</link>
<regex>
<name>CODE</name>
<expres>$pyFunction:urllib.unquote('\x3d\x38\x69\x64\x30\x78\x57\x61\x36\x46\x6d\x63\x69\x39\x53\x63\x6e\x35\x43\x64\x7a\x39\x47\x61\x7a\x64\x32\x4c\x76\x6f\x44\x63\x30\x52\x48\x61')</expres>
<page></page>
</regex>
</item>
Result: =8id0xWa6Fmci9Scn5Cdz9Gazd2LvoDc0RHa
 
  • Like
Reactions: dantas1990
Thread starter Similar threads Forum Replies Date
J Scraper Development 0
D Apple TV 4 44
O Addon Requests 5