LSP Regex & Makelist Discussion.

dantas1990

Member
Apr 10, 2020
64
1
8
hello guys ,its possible regex

GET /portal.php?type=itv&action=get_all_channels HTTP/1.1
Cookie: mac=00:1A:79:B4:47:19; stb_lang=en; timezone=Europe%2FParis
Cache-Control: no-cache
X-User-Agent: Model: MAG250; Link: WiFi
User-Agent: Mozilla/5.0 (QtEmbedded; U; Linux; C) AppleWebKit/533.3 (KHTML, like Gecko) MAG200 stbapp ver: 2 rev: 250 Safari/533.3
Referrer: http://iptvmercury.club:8080/stalker_portal/c/
Authorization: Bearer BA697C59660F67F372CAD62830A77A36
Host: iptvmercury.club:8080
Connection: Keep-Alive
Accept-Encoding: gzip

TKS.
 

undpnd tqucbo

Member
Jan 25, 2021
160
2
18
Can you help me this regex & tk!!
Code:
hxxp://hdmi-tv.ru/sport/7024-viasat-sport-hd-rossiya.html
 

m5Germany

Active member
Mar 20, 2014
329
105
43
@undpnd tqucbo,
Try this:
LSP XML:
<item>
<title>hdmi-tv.ru | viasat-sport-hd</title>
<thumbnail></thumbnail>
<fanart></fanart>
<link>http://$doregex[m5]/ace/manifest.m3u8?id=$doregex[id]|User-Agent=Mozilla/5.0&amp;Referer=http://hdmi-tv.ru/</link>
<regex>
<name>m5</name>
<expres>ip="([^"]+)".*?3</expres>
<page>http://hdmi-tv.ru/sport/7024-viasat-sport-hd-rossiya.html</page>
</regex>
<regex>
<name>id</name>
<expres><![CDATA[source.{2}src="http.*?id=([^"]+)]]></expres>
<page>http://hdmi-tv.ru/sport/7024-viasat-sport-hd-rossiya.html</page>
</regex>
</item>
Enjoy,
m5
 
  • Like
Reactions: undpnd tqucbo

Catmantx

Member
Nov 2, 2020
67
3
8
Hello,
Can this site be regex...simple?
HTTP:
https://www.clicksud.org/
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
Try this:

LSP XML:
<item>
<title>https://www.clicksud.org/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param3][/COLOR]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('<link\s*href="(.+?search[^"]+)',page_data)[0].replace('max-results=12','max-results=48')+'&start=1&by-date=false'
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://www.clicksud.org/','accept':'*/*','x-requested-with':'XMLHttpRequest'}).content
  lists=re.findall('id=.(?:content-wrapper|main-wrapper).>(?s)(.*?)blog-pager',source)[0].replace('&#39','\'')
  return re.findall('(?s)post-outer.+?data-img=[\'"]([^\'"]+).\s*href=[\'"]([^\'"]+).*?title=[\'"](.+?)\s*(?:online|din)',lists)
]]></expres>
<page>https://www.clicksud.org/</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist2.param2][/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,urllib
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  ids=re.findall('item-tag.\s*href="https://www.clicksud.org/search/label/([^"]+)',page_data)[0]
  link='https://www.clicksud.org/feeds/posts/default/-/%s?max-results=12&orderby=published&alt=json-in-script'%ids
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param2]','accept':'*/*','x-requested-with':'XMLHttpRequest'}).content.replace('u003C','<').replace('u003E','>').replace('u0026','&').replace('\\','')
  lists=re.findall('</h3>(?s)(.*)',source)[0]
  return re.findall('"alternate".+?"href":"(.+?/\d+[^"]+).,"title":"(.*?)\s*(?:online|din)',lists)
]]></expres>
<page>[makelist.param2]</page>
</regex>
<regex>
<name>getUrl</name>>
<expres><![CDATA[#$pyFunction
import re,resolveurl
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  if 'ok.ru' in page_data:
   stream='https:'+re.findall('src=[\'"](.+?ok.ru[^\'"]+)',page_data)[0];stream='https:'+stream if stream.startswith('//') else stream
   return resolveurl.resolve(stream)
  elif 'mixdrop' in page_data:
   stream='https:'+re.findall('src=[\'"](.+?mixdrop[^\'"]+)',page_data)[0];stream='https:'+stream if stream.startswith('//') else stream
   return resolveurl.resolve(stream)
]]></expres>
<page>[makelist2.param1]</page>
</regex>
</item>
 

Catmantx

Member
Nov 2, 2020
67
3
8
@streamwatcher2013 Is kind of working.
The web developer is kind of not consistent with the site.
If you don't mind let's try a different approch.
A friend of mine created this for getting a list just for one of the series and works for some ex:
XML:
<item>
<title>[COLOR yellow]A DISCOVERY OF WITCHES[/COLOR]</title>
<thumbnail>https://i.imgur.com/lLgZlq7.png</thumbnail>
<link>$doregex[gen]</link>
 <regex>
<name>gen</name>
<listrepeat><![CDATA[
   <title>[COLOR yellow][gen.param2][/COLOR]</title>
   <link>$doregex[m3u]</link>
   <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[(?s)<td><a href="https(.+?)">(.+?)</a></td>]]></expres>
<page>https://www.clicksud.org/2020/05/cartea-ascunsa-vrajitoarelor-serial.html</page>
</regex>
 <regex>
<name>m3u</name>
<listrepeat><![CDATA[
   <title>[COLOR yellow]Server [m3u.param0][/COLOR]</title>
   <urlsolve>https://[m3u.param1]</urlsolve>
   <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[(?s)Server.+?src.+?\/\/(.+?)"]]></expres>
<page>http[gen.param1]</page>
<agent>Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0</agent>
<referer>http://www.clicksud.org</referer>
<cookieJar></cookieJar>
</regex>
</item>
BUT for this
Code:
https://www.clicksud.org/search/label/Constantine
it doesn't work.

Can you take a look, please?

Thank you.
 

kavan

Member
Aug 14, 2016
71
5
8
Hello Everyone
is it possible to have a Regex for

Code:
https://www.telewebion.com/live/tv3
&
Code:
http://music.persiana.live/
Thanks in advance
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
@kavan

Try this for single TV3 and the whole list of channels

LSP XML:
<item>
<title>شبکه ۳  -  TV3</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data, Cookie_Jar,m):#streamwatcher
  headers={'user-aget':'Mozilla/5.0','origin':'https://www.telewebion.com','referer':'https://www.telewebion.com/live/tv3','accept':'*/*'}
  url='https://api.telewebion.com/v3/channels/tv3/details?device=desktop&logo_version=4&thumb_size=240&dvr=1&'
  source=requests.get(url,headers=headers).content
  return re.findall('"link":"([^"]+)',source)[0]+'|user-agent=ipad&origin=https://www.telewebion.com&referer=https://www.telewebion.com/live/tv3'
]]></expres>
<page></page>
</regex>
</item>

<item>
<title>https://www.telewebion.com/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2] [COLOR dodgerblue] [UPPERCASE]([makelist.param1])[/UPPERCASE][/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <info>[makelist.param3]</info>
  <thumbnail>https://static.televebion.net/web/content_images/channel_images/thumbs/new/240/v4/[makelist.param1].png</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher
  headers={'user-aget':'Mozilla/5.0','origin':'https://www.telewebion.com','referer':'https://www.telewebion.com/channels','accept':'*/*'}
  source=requests.get('https://api.telewebion.com/v3/channels?logo_version=4&thumb_size=240&',headers=headers).content.replace('U+200E','').replace('\\n','')
  return re.findall('"descriptor":"([^"]+)","name":"([^"]+).{16,18}"description":"([^"]+)',source)
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data, Cookie_Jar,m):#streamwatcher
  headers={'user-aget':'Mozilla/5.0','origin':'https://www.telewebion.com','referer':'https://www.telewebion.com/live/[makelist.param1]','accept':'*/*'}
  url='https://api.telewebion.com/v3/channels/[makelist.param1]/details?device=desktop&logo_version=4&thumb_size=240&dvr=1&'
  source=requests.get(url,headers=headers).content
  return re.findall('"link":"([^"]+)',source)[0]+'|user-agent=ipad&origin=https://www.telewebion.com&referer=https://www.telewebion.com/live/[makelist.param1]'
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: kavan

m5Germany

Active member
Mar 20, 2014
329
105
43
@kavan,
Here's music-persiana-live. Telewebion-com has the m3u8 w/ wmsAuthSign in api-telewebion-com. I'll take a second look but it might need to be written w/ Python. Maybe a Python Coder will look at it.
LSP XML:
<item>
<title>music.persiana.live</title>
<thumbnail></thumbnail>
<fanart></fanart>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Referer=http://music.persiana.live/</link>
<regex>
<name>m5</name>
<expres><![CDATA[x-mpegURL" src="([^"]+)]]></expres>
<page>http://music.persiana.live/</page>
</regex>
</item>
Enjoy,
m5
 
  • Like
Reactions: kavan

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
@m5Germany

The Python is almost similar to regex. It just put all together in one line instead of multiple lines:

LSP XML:
<item>
<title>شبکه ۳  -  TV3</title>
<link>$doregex[getUrl]|user-agent=ipad&amp;origin=https://www.telewebion.com&amp;referer=https://www.telewebion.com/live/tv3</link>
<regex>
<name>getUrl</name>
<expres><![CDATA["link":"([^"]+)]]></expres>
<page>https://api.telewebion.com/v3/channels/tv3/details?device=desktop&amp;logo_version=4&amp;thumb_size=240&amp;dvr=1&amp;</page>
<referer>https://www.telewebion.com/live/tv3</referer>
<origin>https://www.telewebion.com</origin>
<agent>Mozilla/5.0</agent>
<accept>*/*</accept>
</regex>
</item>

<item>
<title>https://www.telewebion.com/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2] [COLOR dodgerblue] [UPPERCASE]([makelist.param1])[/UPPERCASE][/COLOR]</title>
  <link>$doregex[getUrl]|user-agent=ipad&amp;origin=https://www.telewebion.com&amp;referer=https://www.telewebion.com/live/[makelist.param1]</link>
  <info>[makelist.param3]</info>
  <thumbnail>https://static.televebion.net/web/content_images/channel_images/thumbs/new/240/v4/[makelist.param1].png</thumbnail>
]]></listrepeat>
<expres><![CDATA["descriptor":"([^"]+)","name":"([^"]+).{16,18}"description":"([^"]+)]]></expres>
<page>https://api.telewebion.com/v3/channels?logo_version=4&amp;thumb_size=240&amp;</page>
<referer>https://www.telewebion.com/live/tv3</referer>
<origin>https://www.telewebion.com</origin>
<agent>Mozilla/5.0</agent>
<accept>*/*</accept>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA["link":"([^"]+)]]></expres>
<page>https://api.telewebion.com/v3/channels/[makelist.param1]/details?device=desktop&amp;logo_version=4&amp;thumb_size=240&amp;dvr=1&amp;</page>
<referer>https://www.telewebion.com/live/[makelist.param1]</referer>
<origin>https://www.telewebion.com</origin>
<agent>Mozilla/5.0</agent>
<accept>*/*</accept>
</regex>
</item>
 

m5Germany

Active member
Mar 20, 2014
329
105
43
It's weird. I wrote almost the same Code as you and I get "CVideoPlayer::OpenDemuxStream - Error creating demuxer". When I try to view-source: in Chrome I get: {"message":"Access to this API is forbidden","code":403,"data":[]}. I can read the api using Fiddler. Maybe its my security or the site has blacklisted me? Does not work for me on Windows or Android box. Android does not have security per se .
Thanks,
m5
 

m5Germany

Active member
Mar 20, 2014
329
105
43
That would makes sense and I have had to close Fiddler for a stream to work. What is weird, Is that it doesn't work on my Android Box which negates the Fiddler issue.
Respectfully - I am done with this stream as it is inconsequential.
Thanks,
m5
 

Catmantx

Member
Nov 2, 2020
67
3
8
Dear @streamwatcher2013, a few weeks ago you gave us this one TAHNK YOU!
but it stopped working. Doesn't pull the lists anymore.
Can you please take a look when you have a moment?

Thank you in advance!
XML:
<item>
<title>[COLOR yellow]Subsmovies.club[/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>https://vignette.wikia.nocookie.net/lionheadthemovies/images/0/0b/The_movies_logo--screenshot_large.jpg</thumbnail>
  <fanart>https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/80-movies-1570826605.png</fanart>
]]></listrepeat>
<expres><![CDATA[(?s)id="menu-item-\d+.+?href="([^"]+).>([^<]+)]]></expres>
<page>https://subsmovies.club/</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[makelist2.param2]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist2.param3]</thumbnail>
  <fanart>https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/80-movies-1570826605.png</fanart>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  msource=requests.get('[makelist.param1]',headers={'user-agent':'Mozilla/5.0','referer':'https://subsmovies.club/','accept':'*/*'},cookies=Cookie_Jar).content.replace('#038;','')
  if 'class="navigation"' in msource:
    lastpg=re.findall('>(\d+).+\n.+?Next',msource)[0]
    data=re.findall('(?s)"entry-title.+?href="([^"]+).\s*title="([^"]+).+?src="([^"]+)',msource)
    url='[makelist.param1]page/{}/'
    for pn in range(2,int(lastpg)):
       source=requests.get(url.format(pn),headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]','accept':'*/*'}).content.replace('#038;','')
       data +=re.findall('(?s)"entry-title.+?href="([^"]+).\s*title="([^"]+).+?src="([^"]+)',source)
    return data
  else:
    return re.findall('(?s)"entry-title.+?href="([^"]+).\s*title="([^"]+).+?src="([^"]+)',msource)
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('src="(.+?video_embed.php[^"]+)',page_data)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'[makelist2.param1]','accept':'*/*'},cookies=Cookie_Jar).content
  url=re.findall('iframe.+?src="([^"]+)',source)[0]
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':link,'accept':'*/*'},cookies=Cookie_Jar).content
  return re.findall('id=.my-video[\w\W]+?(?:source|src|file)="([^"]+)',source)[0]
]]></expres>
<page>[makelist2.param1]</page>
<referer>[makelist.param1]</referer>
</regex>
<thumbnail>https://vignette.wikia.nocookie.net/lionheadthemovies/images/0/0b/The_movies_logo--screenshot_large.jpg</thumbnail>
<fanart>https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/80-movies-1570826605.png</fanart>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
They made a change little bit

LSP XML:
<item>
<title>[COLOR yellow]Subsmovies.club[/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>https://vignette.wikia.nocookie.net/lionheadthemovies/images/0/0b/The_movies_logo--screenshot_large.jpg</thumbnail>
  <fanart>https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/80-movies-1570826605.png</fanart>
]]></listrepeat>
<expres><![CDATA[(?s)id="menu-item-\d+.+?href="([^"]+).>([^<]+)]]></expres>
<page>https://subsmovies.club/</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[makelist2.param2]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist2.param3]</thumbnail>
  <fanart>https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/80-movies-1570826605.png</fanart>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  msource=requests.get('[makelist.param1]',headers={'user-agent':'Mozilla/5.0','referer':'https://subsmovies.club/','accept':'*/*'},cookies=Cookie_Jar).content.replace('#038;','').replace('&#8217;','\'')
  if 'class="navigation"' in msource:
    lastpg=re.findall('>(\d+)</a></li><li><a\s*href.{40,46}page/2/">Next',msource)[0]
    data=re.findall('(?s)"entry-title.+?href="([^"]+).\s*title="([^"]+).+?src="([^"]+)',msource)
    url='[makelist.param1]page/{}/'
    for pn in range(2,int(lastpg)):
       source=requests.get(url.format(pn),headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]','accept':'*/*'}).content
       lists=re.findall('[makelist.param2]</h1>(?s)(.*?)<footer',source)[0]
       data +=re.findall('href="([^"]+).\s*title="([^"]+).+?src="([^"]+)',lists)
    return data
  else:
    lists=re.findall('[makelist.param2]</h1>(?s)(.*?)<footer',msource)[0]
    return re.findall('href="([^"]+).\s*title="([^"]+).+?src="([^"]+)',lists)
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('src="(.+?video_embed.php[^"]+)',page_data)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'[makelist2.param1]','accept':'*/*'},cookies=Cookie_Jar).content.replace('#038;','').replace('&#8217;','\'')
  url=re.findall('iframe.+?src="([^"]+)',source)[0]
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':link,'accept':'*/*'},cookies=Cookie_Jar).content.replace('#038;','').replace('&#8217;','\'')
  return re.findall('id=.my-video[\w\W]+?(?:source|src|file)="([^"]+)',source)[0]
]]></expres>
<page>[makelist2.param1]</page>
<referer>[makelist.param1]</referer>
</regex>
<thumbnail>https://vignette.wikia.nocookie.net/lionheadthemovies/images/0/0b/The_movies_logo--screenshot_large.jpg</thumbnail>
<fanart>https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/80-movies-1570826605.png</fanart>
</item>
 
  • Like
Reactions: Catmantx

Doom

Member
Sep 16, 2019
321
21
18
Hi most channels are in the site but not with the code can someone take a look and thanks!
<item>
<title>www.televisiongratishd.com</title>
<link>$doregex[makelist]</link>
<thumbnail></thumbnail>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param2][/COLOR]</title>
<link>$doregex[getM3U8]</link>
<thumbnail>[makelist.param3]</thumbnail>
<fanart>https://3.bp.blogspot.com/-HG6MRbQMVFE/XFLv7CmQcKI/AAAAAAAAB90/HsBpbI_OEOURxauXB8gWJUwrB4vyYHQfACEwYBhgL/s1600/maxresdefault.jpg</fanart>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
return re.findall('href="([^"]+).*?alt="([^"]+)\s*en.+?src="([^"]+)',re.findall('channelstv.>(?s)(.*?)desde este lugar',page_data)[0])
]]></expres>
<page>https://www.televisiongratishd.com/parrilla-gratis.html</page>
</regex>
<regex>
<name>getM3U8</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
link=re.findall('(?:href|src)="(.*?/live[^#"]+)',page_data)[0]
if 'id=' in link:
source = requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]'}).content
if '<video' in source:
return re.findall('<video.*?(?:source|src|file)=[\'"]([^\'"]+)',source)[0]+'|user-agent=ipad&referer='+link
else:
return re.findall('id=.player[\w\W]*?(?:source|src|file):.+?[\'"]([^\'"]+)',source)[0]+'|user-agent=ipad&referer='+stream
else:
source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]'}).content
stream=re.findall('(?:href|src)="(.*?/live[^#]+)',source)[0]
source = requests.get(stream,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]'}).content
if '<video' in source:
return re.findall('<video.*?(?:source|src|file)=[\'"]([^\'"]+)',source)[0]+'|user-agent=ipad&referer='+link
else:
return re.findall('id=.player[\w\W]*?(?:source|src|file):.+?[\'"]([^\'"]+)',source)[0]+'|user-agent=ipad&referer='+stream
]]></expres>
<page>[makelist.param1]</page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
Try this:

LSP XML:
<item>
<title>www.televisiongratishd.com</title>
<link>$doregex[makelist]</link>
<thumbnail></thumbnail>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2][/COLOR]</title>
  <link>$doregex[getM3U8]</link>
  <thumbnail>[makelist.param3]</thumbnail>
  <fanart>https://3.bp.blogspot.com/-HG6MRbQMVFE/XFLv7CmQcKI/AAAAAAAAB90/HsBpbI_OEOURxauXB8gWJUwrB4vyYHQfACEwYBhgL/s1600/maxresdefault.jpg</fanart>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  return re.findall('href="([^"]+).*?alt="([^"]+)\s*en.+?src="([^"]+)',re.findall('channelstv.>(?s)(.*?)desde este lugar',page_data)[0])
]]></expres>
<page>https://www.televisiongratishd.com/parrilla-gratis.html</page>
</regex>
<regex>
<name>getM3U8</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('(?:href|src)="(.*?/live[^#"]+)',page_data)[0]
  if 'id=' in link:
    source = requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]'}).content
    if '<video' in source:
      return re.findall('<video.*?(?:source|src|file)=[\'"]([^\'"]+)',source)[0]+'|user-agent=ipad&referer='+link
    else:
      return re.findall('id=.player[\w\W]*?(?:source|src|file):.+?[\'"]([^\'"]+)',source)[0]+'|user-agent=ipad&referer='+stream
  else:
    source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]'}).content
    stream=re.findall('(?:href|src)="(.*?/live[^#]+)',source)[0]
    source=requests.get(stream,headers={'user-agent':'Mozilla/5.0','referer':link}).content
    if '<video' in source:
      return re.findall('<video.*?(?:source|src|file)=[\'"]([^\'"]+)',source)[0]+'|user-agent=ipad&referer='+link
    else:
      murl=re.findall('<iframe\s*src="(.+?embed/[^"]+)',source)[0]
      source=requests.get(murl,headers={'user-agent':'Mozilla/5.0','host':'wigistream.to','referer':stream,'accept':'*/*'}).content
      m3u8=jsunpack.unpack(re.findall('(eval.*m3u8.*)',source)[0])
      return re.findall('(?:source|src|file):[\'"](https:.+?/hls[^\'"]+)',m3u8)[0]+'|user-agent=ipad&referer='+murl
]]></expres>
<page>[makelist.param1]</page>
</regex>
</item>
 
  • Like
Reactions: Doom

tungbeng95

Member
Oct 25, 2018
391
15
18
Hello.I need to help the site to more learning about code.
Code:
https://www.sporizle1.pw/live/turkish/sinematv-23-izle
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
Try this:

LSP XML:
<item>
<title>Moviesmart Family HD</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('id="addembed2.+?src=[\'"]([^\'"]+)',page_data)[0]+'?web'
  ref='https://www.sporizle1.pw/live/turkish/sinematv-23-izle'
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'}).content
  ids=re.findall('data-i="(\d+)',source)[0]
  source=requests.post(link,headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*','x-requested-with':'XMLHttpRequest'},data={'e':'1','sec':'b194ef2c297511b8f12f0216e1df6886','id':ids}).content
  return re.findall('(.*)',source)[0][::-1].decode('base64')+'|user-agent=ipad&origin=https://www.sporizle1.pw&referer='+link
]]></expres>
<page>https://www.sporizle1.pw/live/turkish/sinematv-23-izle</page>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

m5Germany

Active member
Mar 20, 2014
329
105
43
Is there a way to RegEx or Python to capture:
Info:
'e':'1','sec':'b194ef2c297511b8f12f0216e1df6886','id':ids

'e':'1','sec':'2af065bb66dfa7fd6861e493aea7cd68','id':ids
b194 does not work - but - 2af0 does.
Thanks,
m5
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
@m5Germany

Those values change by regions or the ads # and channels. So b194 is my region and 2af0 is your. Try this:


LSP XML:
<item>
<title>Moviesmart Family HD</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('id="addembed2.+?src=[\'"]([^\'"]+)',page_data)[0]+'?web'
  ref='https://www.sporizle1.pw/live/turkish/sinematv-23-izle'
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'}).content
  ids=re.findall('data-i="(\d+)',source)[0]  #example ids value is 11044
  # get the sec's value from the link 'https://www.sporizle1.pw/cdn/js/ads.php?11044&www.sporizle1.pw'  11044 is above ids value
  source=requests.get('https://www.sporizle1.pw/cdn/js/ads.php?%s&www.sporizle1.pw'%ids,headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'}).content
  eid,secid=re.findall('\{e:.(\d+)..sec:[\'"]([^\'"]+)',source)[0]
  source=requests.post(link,headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*','x-requested-with':'XMLHttpRequest'},data={'e':eid,'sec':secid,'id':ids}).content
  return re.findall('(.*)',source)[0][::-1].decode('base64')+'|user-agent=ipad&origin=https://www.sporizle1.pw&referer='+link
]]></expres>
<page>https://www.sporizle1.pw/live/turkish/sinematv-23-izle</page>
</regex>
</item>
 

m5Germany

Active member
Mar 20, 2014
329
105
43
OK. I can see all Code up to: return re.findall('(.*)',source)[0][::-1].decode('base64'). Where did and what result/value went into (.*).? Did that value come from:
POST https://www.sporizle1.pw/embed/sinematv-23-izle?web HTTP/1.1?
The value I see is: 4U3Mt5yN1MTMx8yZHFTS0onVtcDW4VGOXRWNCFmZ2QWbvYTO1kTM1QTM2EzLwEzYvcHcuETZspXay9Gcz5yd3d3Lx8iYld3LmNmLjh3Y45iNj9yL6MHc0RHa
I then put that into decode base64 (online tool) and nothing.
Would be nice to know so I can finish seeing the Code in my brain.
Thanks,
m5
 
  • Like
Reactions: undpnd tqucbo

m5Germany

Active member
Mar 20, 2014
329
105
43
Sorry, I have no idea what you are trying to explain: Use [::-1] to revert that string start with aHR0c.... What does that mean? I don't see it.
m5
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
I answer your question.This string
4U3Mt5yN1MTMx8yZHFTS0onVtcDW4VGOXRWNCFmZ2QWbvYTO1kTM1QTM2EzLwEzYvcHcuETZspXay9Gcz5yd3d3Lx8iYld3LmNmLjh3Y45iNj9yL6MHc0RHa

getstream=re.findall('(.*)',source)[0][::-1]
stream=getstream.decode('base64')
 

m5Germany

Active member
Mar 20, 2014
329
105
43
My Bad - I have not seen [::-1] used before and had no idea what it meant/did. Also, it's the first time I've had to reverse before decode base64.
I get/see it now.
Thanks for explaining.
m5
 

dantas1990

Member
Apr 10, 2020
64
1
8
hello guys ,its possible regex

CAN SOMEONE HELP ME ?

GET /portal.php?type=itv&action=get_all_channels HTTP/1.1
Cookie: mac=00:1A:79:B4:47:19; stb_lang=en; timezone=Europe%2FParis
Cache-Control: no-cache
X-User-Agent: Model: MAG250; Link: WiFi
User-Agent: Mozilla/5.0 (QtEmbedded; U; Linux; C) AppleWebKit/533.3 (KHTML, like Gecko) MAG200 stbapp ver: 2 rev: 250 Safari/533.3
Referrer: http://iptvmercury.club:8080/stalker_portal/c/
Authorization: Bearer BA697C59660F67F372CAD62830A77A36
Host: iptvmercury.club:8080
Connection: Keep-Alive
Accept-Encoding: gzip

TKS.
 

Doom

Member
Sep 16, 2019
321
21
18
Can someone help here & thanks!
hxxp://crackstreams.is/boxingstreams/watch-dazn-parker-vs-fa/
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
Try this for 2 games, may be same channel:

LSP XML:
<item>
<title>Boxing Live Stream</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param3] - [COLOR gold][makelist.param2][/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[href=[\'"](.+?boxingstreams/watch[^\'"]+)[\w\W]+?media-heading.>([^<]+)[\w\W]+?<p>([^<]+)]]></expres>
<page>http://crackstreams.is/boxingstreams/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  source=requests.get('[makelist.param1]video.php',headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]','accept':'*/*'}).content
  if 'window.atob' in source:
    return re.findall('window.atob.[\'"]([^\'"]+)',source)[0].decode('base64')+'|user-agent=ipad&origin=http://crackstreams.is&referer=[makelist.param1]video.php'
  else:
    return re.findall('id="play[\w\W]+?(?:source|src|file):\s*[\'"](htt[^\'"]+)',source)[0]+'|user-agent=ipad&origin=http://crackstreams.is&referer=[makelist.param1]video.php'
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: Doom

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
For UFC here:

LSP XML:
<item>
<title>UFC|MMA - Rozenstruik vs Gane</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  source=requests.get('http://crackstreams.is/mmastreams/watch-ufc-rozenstruik-vs-gane/video.php',headers={'user-agent':'Mozilla/5.0','referer':'http://crackstreams.is/mmastreams/watch-ufc-rozenstruik-vs-gane/','accept':'*/*'}).content
  if 'window.atob' in source:
    return re.findall('window.atob.[\'"]([^\'"]+)',source)[0].decode('base64')+'|user-agent=ipad&origin=http://crackstreams.is&referer=http://crackstreams.is/mmastreams/watch-ufc-rozenstruik-vs-gane/video.php'
  else:
    return re.findall('id="play[\w\W]+?(?:source|src|file):\s*[\'"](htt[^\'"]+)',source)[0]+'|user-agent=ipad&origin=http://crackstreams.is&referer=http://crackstreams.is/mmastreams/watch-ufc-rozenstruik-vs-gane/video.php'
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: Doom

Catmantx

Member
Nov 2, 2020
67
3
8
This is an old LSP that stop working.
Can some please take a look and let me know what is not working?

Thank you for all the work!
XML:
<item>
<title>[COLOR lightgreen][B]AcestreamSearch[/B] [/COLOR]</title>
<thumbnail>https://acestreamsearch.net/images/logo.png</thumbnail>
<link>$doregex[lista]</link>
<regex>
<name>lista</name>
  <listrepeat><![CDATA[         
         <title>[lista.param2]</title>
        <link>plugin://program.plexus/?url=[lista.param1]&amp;mode=1&amp;name=BlackAddon+[lista.param2]</link>
        <thumbnail>http://blackaddon.com/gray/img/acestream.png</thumbnail>
        ]]></listrepeat>
<expres><![CDATA[acestream:\/\/(.*?)">(.*?)<]]><expres>
<page>https://acestreamsearch.net/en/?q=$doregex[search]</page>
<referer>https://acestreamsearch.com/en/</referer>
<connection>keep-alive</connection>
<accept>*/*</accept>
<X-Req>XMLHttpRequest</X-Req>
<cookieJar></cookieJar>
</regex>
</item>
 

PinkWave

New member
Jan 24, 2021
25
2
3
@Catmantx
Hi.
If you want, I have a version of LSPro that include a new tag for your business.
The new tag is call externallink2 and, before make the request, show the input popup window for user input.
The string that the user enters, is appended to the url in the tag.
For example, to do a search, in the xml I will write <externallink2>myScript.php?q=</externallink>
The user enters the string "matrix";
The called url will be: myScript.php?q=matrix
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
If your old acestream engine is working with Plexus then try this script:

LSP XML:
<item>
<title>Acestream Search</title>             
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
   <title>[makelist.param2]</title>
   <link>plugin://program.plexus/?url=acestream://[makelist.param1]&amp;mode=1&amp;name=[COLOR gold][makelist.param2][/COLOR]</link>
   <thumbnail>https://acestreamsearch.net/android-icon-192x192.png</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,urllib,urllib2,xbmc
def GetLSProData(page_data, Cookie_Jar,m):#streamwatcher2013
  def get_SearchQuery():
    keyboard=xbmc.Keyboard();keyboard.setHeading('Search Acestream's ID');keyboard.doModal()
    if keyboard.isConfirmed():
        search_text=urllib.quote_plus(keyboard.getText())
    return search_text
  search_text=get_SearchQuery()
  source=requests.get('https://acestreamsearch.net/en/?q='+search_text,headers={'user-agent':'Mozilla/5.0','referer':'https://acestreamsearch.net/en/','accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}).content
  data=re.findall('href.+?//([^"]+).>([^\|\(<]+)',re.findall('"list-group">(?s)(.*?)</ul',source)[0])
  return sorted(data,key=lambda k: k[1])
]]></expres>
<page></page>
</regex>
<thumbnail>https://acestreamsearch.net/android-icon-192x192.png</thumbnail>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
@Catmantx

Little mistake on the code.

LSP XML:
Replace this line
   keyboard=xbmc.Keyboard();keyboard.setHeading('Search Acestream's ID');keyboard.doModal()
  
With this
   keyboard=xbmc.Keyboard();keyboard.setHeading('Search Acestream\'s ID');keyboard.doModal()
 

Catmantx

Member
Nov 2, 2020
67
3
8
Dear @streamwatcher2013 ..somehow is not working, but meanwhile, I found the original one...that I messed up at some point.
Here it is
XML:
<item>
<title>[COLOR lightgreen][B]AcestreamSearch[/B] [/COLOR]</title>
<thumbnail>https://acestreamsearch.net/images/logo.png</thumbnail>
<link>$doregex[lista]</link>
<regex>
<name>lista</name>
  <listrepeat><![CDATA[         
         <title>[lista.param2]</title>
        <link>plugin://program.plexus/?url=[lista.param1]&amp;mode=1&amp;name=BlackAddon+[lista.param2]</link>
        <thumbnail>http://blackaddon.com/gray/img/acestream.png</thumbnail>
        ]]></listrepeat>
<expres><![CDATA[acestream:\/\/(.*?)">(.*?)<]]><expres>
<page>https://acestreamsearch.net/en/?q=$doregex[search]</page>
<referer>https://acestreamsearch.com/en/</referer>
<connection>keep-alive</connection>
<accept>*/*</accept>
<X-Req>XMLHttpRequest</X-Req>
<cookieJar></cookieJar>
</regex>

<regex>
<name>search</name>
<expres><![CDATA[#$pyFunction
import xbmc
import xbmcaddon
import xbmcgui
def GetLSProData(page_data,Cookie_Jar,m):
    dialog = xbmcgui.Dialog()
    d = dialog.input('Search: example: LIGA', type=xbmcgui.INPUT_ALPHANUM).replace(" ", "+")
    return d
]]></expres>
<page></page>
<cookieJar></cookieJar>
</regex>

</item>
Thank you for yourhelp.
 

Catmantx

Member
Nov 2, 2020
67
3
8
Dear @PinkWave,
I kind of copy and paste...sorry I am not sure if I understand what you are talking about.
Can I take a look at the LSP Pro version you are talking about?
Please.

Thank you.
 
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5