LSP Regex & Makelist Discussion.

redota

New member
Jul 3, 2016
13
0
1
hello need help with this link please thanks

hxxp://cablegratis.online/canal-4-montecarlo-tv-en-vivo/
 

gujal

Developer
Dec 26, 2013
291
89
28
These are the urls used by cablegratis, all the channel stream urls are in there, it cannot be converted into a LSP makelist easily with logos, channel names, etc, as mentioned in the post linked above.
Code:
http://futboltv-envivo.com/apjs/apmusica.js
http://futboltv-envivo.com/apjs/apadultos.js
http://futboltv-envivo.com/apjs/apespa%C3%B1a.js
http://futboltv-envivo.com/apjs/apperu.js
http://futboltv-envivo.com/apjs/apmexico.js
http://futboltv-envivo.com/apjs/apargentina.js
http://futboltv-envivo.com/apjs/appuertorico.js
http://futboltv-envivo.com/apjs/apchile.js
http://futboltv-envivo.com/apjs/apuruguay.js
http://futboltv-envivo.com/apjs/apusa.js
 
  • Like
Reactions: redota

boomski2

New member
Aug 19, 2019
14
1
3
hi sifu, anyone can help me with this

Code:
http://www1.fastdrama.me/browse/chinese/movies/all/all/all/0
 

gujal

Developer
Dec 26, 2013
291
89
28
Does anything play on the website?
Every item seems to have the same 1second blank MP4 embedded
var sourcesAPI = [{ 'label': '360p', 'default': true, 'type': 'video/mp4', 'file': 'http://fastdrama.me/video1s.mp4'}];
 

upd8t3r

New member
Oct 16, 2019
4
0
1
I have a regex that I'm stuck on trying to figure out one part of it. I'm trying to capture text that is dynamic and then use that captured text to find and match that text to get the final part.

So I've got one regex that captures dynamic text and it is correctly capturing that text. But when I try to use what I've gotten to then find that matching text somewhere else on the page, I can't figure that out. I couldn't find any regex examples that use another <regex> in an <expres> to look for a match.

It's the ('$doregex[getUrlPart]') part in the 2nd regex that's not working. I just can't figure out how it should be, to use the text that's captured from the getUrlPart regex and put it in the <expres> of the finalUrlPart regex to find that same text somewhere else on the page, and capture the text after it.

Code:
#This regex works
<regex>
<name>getUrlPart</name>
<expres><![CDATA[return.+?getElementById[(]"(.*?)"[)].innerHTML]]></expres>                                           
<page>https://PageImRegexing</page>
<cookieJar></cookieJar>
</regex>

#This regex doesn't work. I'm trying to use the text I captured with the above regex, to find it in another place on the page and trying to capture the text right after it.
<regex>
<name>finalUrlPart</name>
<expres><![CDATA[span.+?('$doregex[getUrlPart]')>(.*?)</span>]]></expres>                                               
<page>https://PageImRegexing</page>
<cookieJar></cookieJar>
</regex>
 

streamwatcher2013

Active member
Oct 24, 2013
474
89
28
USA
May be like this
Code:
<regex>
<name>finalUrlPart</name>
<expres><![CDATA[$doregex[getUrlPart].>([^<]+)]]></expres>                                             
<page>https://PageImRegexing</page>
<cookieJar></cookieJar>
</regex>
 

upd8t3r

New member
Oct 16, 2019
4
0
1
I thought you might be on to something but I tried that and other similar stuff and couldn't get it to work. The reason I didn't include the url page is because I was hoping to figure it out myself and just get help on how to use the the $doregex between the <expres> tags for searching for a match. I'd rather not just be given the working code for pages, I find it more helpful to know what part is wrong and why so I'll know how to do similar regexes in the future.

Here's what I have, everything works except the 2 regex parts that reference the $doregex to search for a match to them.

I've already tried posting this with the page url being used inside the code tags and my post wasn't allowed to be viewed for some reason, so I've censored the url but you should still be able to tell what it really is.

Code:
<item>
<title>Test URL</title>
<link>http:$doregex[MainUrlPart]$doregex[final2ndUrlPart]$doregex[final3rdUrlPart]|Referer=hxxps://www.str**mlive.to/view/46476/ABC-(HD)&amp;User-Agent=Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36</link>   

#Here I'm trying to get the main part of the url
<regex>  THIS WORKS
<name>getMainUrl</name>                                           
<expres><![CDATA[return.+?"(.*?)["]].join]]></expres>                               
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>

#Here I'm replacing the ",", the , and the \/ with / to get the real main url part
<regex>  THIS WORKS
<name>MainUrlPart</name>
<expres>$pyFunction:('$doregex[getMainUrl]').replace('","','').replace('\/','/').replace(',','')</expres>
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>                         

#Here I'm trying to get the variable for the 2nd part of the url
<regex>  THIS WORKS
<name>find2ndUrlPart</name>
<expres><![CDATA[return.+?join.+?[("][")]\s*[+]\s*(.*?).join]]></expres>
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>

#Here I'm searching for the find2ndUrlPart variable which is just a little further down the page, to get the next part of the url
<regex>  THIS DOES NOT WORK
<name>get2ndUrlPart</name>
<expres><![CDATA[innerHTML.+?var\s*$doregex[find2ndUrlPart] =.+?[["](.*?)["];]]]></expres>                                       
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>

#Here I'm replacing the "," to get the real 2nd url part
<regex>  THIS SHOULD WORK WHEN THE get2ndUrlPart WORKS
<name>final2ndUrlPart</name>
<expres>$pyFunction:('$doregex[get2ndUrlPart]').replace('","','')</expres>
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>

#Here I'm trying to get the variable for the last part of the url
<regex>  THIS WORKS
<name>get3rdUrlPart</name>
<expres><![CDATA[return.+?getElementById[(]"(.*?)"[)].innerHTML]]></expres>                                           
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>

#Here I'm searching for the get3rdUrlPart variable which is at the top of the page, to get the final part of the url
<regex>  THIS DOES NOT WORK
<name>final3rdUrlPart</name>
<expres><![CDATA[id=$doregex[getUrlPart]>([^<]+)]]></expres>                                               
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>
<thumbnail></thumbnail>
<fanart></fanart>
</item>
 

streamwatcher2013

Active member
Oct 24, 2013
474
89
28
USA
This should work for you. all call on that page must be at the same place to hold the dynamic value not changed.

Code:
<item>
<title>ABC (HD)</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  sid=re.findall('source:\s*([^\(]+)',page_data)[0]
  url,tok1,tok2=re.findall('%s[\w\W]*?return.+?\[(.*?)\].+?\+\s*([^\.]+).+?"(\w[^"]+)'%sid,page_data)[0]
  rtmp=''.join(eval(url)).replace('\\','')
  token=re.findall('var\s*%s.+?\[([^\]]+)'%tok1,page_data)[0];token=''.join(eval(token))
  atoken=re.findall('id=%s>(.*?)<'%tok2,page_data)[0]
  return 'https:%s%s%s|user-agent=ipad&referer=https://www.streamlive.to/view/46476/ABC-(HD)'%(rtmp,token,atoken)
]]></expres>
<page>hxxps://www.st**mlive.to/view/46476/ABC-(HD)</page>
</regex>
</item>
 

upd8t3r

New member
Oct 16, 2019
4
0
1
Thank you for figuring it out. I actually was thinking about it for a while and was just able to come up with a different solution that works, and was even able to substitute my ip address with a different one, just to be more anonymous. It's definitely not as cleanly or efficiently coded as yours but it works. What I realized is that the beginning of the dynamic url part is always c2Vydm, so I just search in the page for that, and the last part of the url is actually always the same, so I can just add that in the link myself.


Code:
<item>
<title>ABC</title>
<link>http:$doregex[MainUrlPart]c2Vydm$doregex[final2ndUrlPart]dXRlcz0yNDAmc3RybV9sZW49MjMmaXA9MTc2LjEwMy4xMzAuMTMw|Referer=hxxps://www.str**mlive.to/view/46476/ABC-(HD)&amp;User-Agent=Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36</link>   
<regex>
<name>getMainUrl</name>                                           
<expres><![CDATA[return.+?"(.*?)["]].join]]></expres>                               
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>MainUrlPart</name>
<expres>$pyFunction:('$doregex[getMainUrl]').replace('","','').replace('\/','/').replace(',','')</expres>
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>                         
<regex>
<name>getThe2ndUrlPart</name>
<expres><![CDATA[document.getElementById.*[\w\W\s]*?[[]"c2V","ydm(.*?)["]]]]></expres>                                       
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>final2ndUrlPart</name>
<expres>$pyFunction:('$doregex[getThe2ndUrlPart]').replace('","','')</expres>
<page>hxxps://www.str**mlive.to/view/46476/ABC-(HD)</page>
<cookieJar></cookieJar>
</regex>
<thumbnail></thumbnail>
<fanart></fanart>
</item>
 

RRrorony

New member
Jun 17, 2019
1
0
1
Hello everybody, i need help to decode this
Code:
OZtO2nwiRsctAed+MdIGV23YPz9vlEq3xXDinXbBm0CP6AYSk2KBmd8DSbaBu0b7LnpXxiGzh6h//Uk4XG7RD6X6U3AxRCIAqtExc2h6jaEwpKSiTzedv4btIncIqsfj83qAqfZ+cUSq825rlCtFrgTddMgZDZ+tYrUa32vqyzu8HoBaV0eTDlS/AGbxnKkN2n1Gcf5u1dyDA+Rpn0YDv/azfi0wMqzm21Tp/UEsBzs/ScktU/E2yc9ivkhk3b/USa2biO1xjkyMrKjNHAnaCBQBlfyGqyr2078G0xd8F2Q=
it's come from this link
Code:
https://www.ballsoi8.com/ztvapi/generator.php?channel_id=beinsport1fr
and must give and url like this
Code:
https://cdn227.cloud-streaming.com/ballsoi8_r4/beinsport1fr/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9MTEvMTEvMjAxOSAyOjAzOjI0IFBNJmhhc2hfdmFsdWU9emY0anJQbDhIdXROc202RWFoZXh6Zz09JnZhbGlkbWludXRlcz0xJmlkPTgxMjkyNg==
thanks for your help
 

DarkSky

Member
Apr 1, 2016
38
0
6
can someone create regex only for this channel

Code:
https://canlitvizle.com/star-tv-hd-izle-4
dont create makelist regex
 

gujal

Developer
Dec 26, 2013
291
89
28
Enjoy!

LSP XML:
<item>
<title>Star TV</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, unwise
  r = re.search("file:\s*(?:''\+)?(?P<var1>[^+]+)\+'(?P<part2>[^']+)'\+(?P<var3>[^+]+)", page_data)
  while 'w,i,s,e' in page_data:
      page_data = unwise.unwise_process(page_data)
  part1 = re.findall("{0}\s*=\s*'([^']+)".format(r.group('var1')), page_data)[0]
  part3 = re.findall("{0}\s*=\s*'([^']+)".format(r.group('var3')), page_data)[0]
  return part1 + r.group('part2') + part3
]]></expres>
<page>$doregex[iframe]</page>
<referer>https://canlitvizle.com/</referer>
</regex>
<regex>
  <name>iframe</name>
  <expres>iframe.+?src="([^"]+)</expres>
  <page>https://canlitvizle.com/star-tv-hd-izle-4</page>
</regex>
</item>
 
  • Like
Reactions: DarkSky and altug

DarkSky

Member
Apr 1, 2016
38
0
6
thank you gujal but for me it dont work
which LSP and Kodi version are you using?

must i update something?

i use k17.6
 

urualf

New member
Jan 19, 2016
25
0
1
please need help with this thanks guys

hxxps://televisionlibre.net/canal/net-en-vivo/
 

gujal

Developer
Dec 26, 2013
291
89
28
From the html page source seems static
Javascript:
playerInstance.setup({
      file: "https://unlimited5-us.dps.live/nettv/nettv.smil/nettv/livestream1/chunks.m3u8",
      type: "hls",
      width: "100%",
      height: "100%",
      aspectratio: "16:9",
      autostart: true,
      cast:{},
      ga:{}
    });
 
  • Like
Reactions: urualf and redota

DerWolf

New member
Nov 20, 2019
12
1
3
help me this site please in advance

hxxps://m.surfmusik.de/land/deutschland.html
 

streamwatcher2013

Active member
Oct 24, 2013
474
89
28
USA
XML:
<item>
<title>https://m.surfmusik.de/land/deutschland.html</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[getmp3]</link>
]]></listrepeat>
<expres><![CDATA[<li><a\s*href="(.*?)".+?>([^<]+)]]></expres>
<page>https://m.surfmusik.de/land/deutschland.html</page>
</regex>
<regex>
<name>getmp3</name>
<expres>'file':\s*'([^']+)</expres>
<page>[makelist.param1]</page>
</regex>
</item>
 
  • Like
Reactions: DerWolf and turko03

urualf

New member
Jan 19, 2016
25
0
1
this regex no work in live streampro 2.8.3need update ??? o maybe this regex no work ,please help thanks guys

Code:
<item>
<title>Television Libre</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param3]</title>
<link>$doregex[getpage]|User-Agent=iPad&amp;Referer=http://ustvgo.tv/</link>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[(?s)card-wrapper">\s*<a href="(?:\.\.)?(/[^"]+).+?src="([^"]+).+?title="([^"]+)]]></expres>
<page>https://televisionlibre.net/es/</page>
</regex>
<regex>
<name>getpage</name>
<expres>file:\s*['"]([^'""]+)</expres>
<page>https://televisionlibre.net$doregex[embed]</page>
<referer>https://televisionlibre.net/</referer>
</regex>
<regex>
<name>embed</name>
<expres><![CDATA[<iframe.+?src="(?:\.\./\.\.)?(/[^"]+)]]></expres>
<page>https://televisionlibre.net[makelist.param1]</page>
<referer>https://televisionlibre.net/</referer>
</regex>
</item>
 
Last edited by a moderator:

papaya

Member
Apr 4, 2018
31
1
8
anyone got makelist regex for this site? mind to share?

Code:
https://zzanime.com/movies/
 

streamwatcher2013

Active member
Oct 24, 2013
474
89
28
USA
XML:
<item>
<title>https://zzanime.com/movies/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param3]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  mdata=re.findall('(?s)"poster".+?href="([^"]+).+?src="([^"]+).+?alt="([^"]+)',re.findall('id="archive-content"(?s)(.*?)pagination',page_data)[0].replace('&#8217;','\'').replace('&#8211;','-').replace('#038;',''))
  count=10;pn=2;data=[]
  while pn <= int(count):
    page='https://zzanime.com/movies/page/'+str(pn)+'/';source=requests.get(page).content.replace('&#8217;','\'').replace('&#8211;','-').replace('#038;','')
    data +=re.findall('(?s)"poster".+?href="([^"]+).+?src="([^"]+).+?alt="([^"]+)',re.findall('id="archive-content"(?s)(.*?)pagination',source)[0]);pn +=1
  return mdata+data
]]></expres>
<page>https://zzanime.com/movies/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  streamID=int(re.findall('id=.player-option-1.+?data-post=.(\d+)',page_data)[0])
  source=requests.post('https://zzanime.com/wp-admin/admin-ajax.php',headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]','x-requested-with':'XMLHttpRequest'},data={'action':'doo_player_ajax','post':streamID,'nume':'1','type':'movie'}).content
  return re.findall('"file":"([^"]+)',source)[0]+'|user-agent=ipad&referer=[makelist.param1]'
]]></expres>
<page>[makelist.param1]</page>
</regex>
</item>
 

efradncr

Member
Mar 26, 2018
32
0
6
Will a regex be possible for this site?
Code:
hxxps://teveplay.xavitec.net/
 

streamwatcher2013

Active member
Oct 24, 2013
474
89
28
USA
Similar with the one above. Try ti see it works.

XML:
<item>
<title>https://teveplay.xavitec.net/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
 <title>[makelist.param3] ([makelist.param4])</title>
 <link>$doregex[getUrl]</link>
 <thumbnail>[makelist.param1]</thumbnail>
  <info>[makelist.param5]</info>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  mdata=re.findall('(?s)"item movies".+?src="([^\?]+).+?<h3.+?href="(.*?)">([^<]+).+?imdb".+?<span>(\d+).+?"texto">([^<]+)',re.findall('id="archive-content"(?s)(.*?)pagi',page_data)[0].replace('&#8217;','\'').replace('&#8211;','-').replace('#038;',''))
  count=re.findall('"pagination".+?de\s*(\d+)',page_data)[0];pn=2;data=[]
  while pn <= int(count):
    page='https://teveplay.xavitec.net/movies/page/'+str(pn)+'/';source=requests.get(page).content.replace('&#8217;','\'').replace('&#8211;','-').replace('#038;','')
    data +=re.findall('(?s)"item movies".+?src="([^\?]+).+?<h3.+?href="(.*?)">([^<]+).+?imdb".+?<span>(\d+).+?"texto">([^<]+)',re.findall('id="archive-content"(?s)(.*?)pagi',source)[0]);pn +=1
  return mdata+data
]]></expres>
<page>https://teveplay.xavitec.net/movies/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  streamID=int(re.findall('id=.player-option-1.+?data-post=.(\d+)',page_data)[0])
  source=requests.post('https://teveplay.xavitec.net/wp-admin/admin-ajax.php',headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param2]','x-requested-with':'XMLHttpRequest'},data={'action':'doo_player_ajax','post':streamID,'nume':'1','type':'movie'}).content
  if 'iframe' in source:
    link=re.findall('<iframe.+?src=[\'"]([^\'"]+)',source)[0]
    source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param2]'}).content
    return re.findall('<video.+?source\s*src="([^"]+)',source)[0]+'|user-agent=ipad&referer='+link
  else:
    return re.findall('<video.+?source\s*src="([^"]+)',source)[0]+'|user-agent=ipad&referer=[makelist.param2]'
]]></expres>
<page>[makelist.param2]</page>
</regex>
</item>
 
  • Like
Reactions: adrianhn

adrianhn

New member
Mar 20, 2014
16
4
3
anyone knows why kodi can´t play hxxp://cdnrapidvideo.com/m3u8/index_NjMz.m3u8 from

hxxps://teveplay.xavitec.net/
the regex work but dont play .
 

gujal

Developer
Dec 26, 2013
291
89
28
@adrianhn
Yep it wont play as it is a fake hoster hosting the chunks disguised as PNG files in GoogleDocs, KodiPlayer will see it as PNG and try to open as PNG and will fail
Read about it here
Code:
https://forum.kodi.tv/showthread.php?tid=349359
 

Doom

New member
Sep 16, 2019
7
0
1
Could some master coder help me with this and thanks!
hxxps://batflix.org/movies
 
Thread starter Similar threads Forum Replies Date
J Scraper Development 0
D Apple TV 4 44
O Addon Requests 5