LSP Regex & Makelist Discussion.

faustino

New member
Sep 1, 2020
21
0
1
need regex for this channel, in "OPÇÃO 2 HD" or "OPÇÃO 3 HD"

https://multicanais.com/assistir-canal-premiere-clubes-ao-vivo/
 

m5Germany

Active member
Mar 20, 2014
181
48
28
@faustino,
Here's what I have. They appear to be static m3u8's. Can't RegEx or Python - not enough knowledge. Appear to be SD streams.
LSP XML:
GET https://live.multicanais.org/PREMIERECLUBESSD/video.m3u8 HTTP/1.1
Host: live.multicanais.org
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Accept: */*
Origin: https://esporteone.com
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://esporteone.com/player/canais.php?canal=PREMIERECLUBESSD
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9

<item>
<title>OPÇÃO 2 SD</title>
<link>https://live.multicanais.org/PREMIERECLUBESSD/video.m3u8|User-Agent=Mozilla/5.0&amp;Referer=https://esporteone.com/player/canais.php?canal=PREMIERECLUBESSD</link>
</item>


GET https://live.netcanais.com/PREMIERECLUBESHD/video.m3u8 HTTP/1.1
Host: live.netcanais.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Accept: */*
Origin: https://esporteone.com
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://esporteone.com/player/canais.php?canal=PREMIERECLUBESHD
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9

<item>
<title>OPÇÃO 3 SD</title>
<link>https://live.netcanais.com/PREMIERECLUBESHD/video.m3u8|User-Agent=Mozilla/5.0&amp;Referer=https://esporteone.com/player/canais.php?canal=PREMIERECLUBESHD</link>
</item>
Enjoy,
m5
 

streamwatcher2013

Well-known member
Oct 24, 2013
897
383
63
USA
@faustino
The stream is down. But it may come back later with the same source:. Change PREMIERECLUBESSD to PREMIERECLUBESHD for OPÇÃO 3 HD

LSP XML:
<item>
<title>OPÇÃO 2 HD </title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  ghtml=eval(re.findall('var.*?(\[[^;]+)', page_data, re.DOTALL)[0])
  value=int(re.findall('replace.*?-\s*(\d*)', page_data)[0])
  html=''
  for s in ghtml:
    html +=chr(int(re.findall('\D*(\d*)',s.decode('base64'))[0]) - value)
  list=re.findall('var\s*items.+?\(([^\)]+)',html)[0]
  dname=re.findall("'([^',]+)",list)
  netloc=max(dname,key=len)
  return 'https://live.%s/PREMIERECLUBESSD/video.m3u8|user-agent=ipad&referer=https://esporteone.com/player/canais.php?canal=PREMIERECLUBESSD'%netloc
]]></expres>
<page>https://esporteone.com/player/canais.php?canal=PREMIERECLUBESSD</page>
<referer>https://multicanais.com/assistir-canal-premiere-clubes-ao-vivo/</referer>
<agent>Mozilla/5.0</agent>
</regex>
</item>
 

dantas1990

Member
Apr 10, 2020
51
1
8
Good evening

I would like to know if the REGEX possibility of a STB code please.
Example below:
MAC = 00: xx: xx: xx: xx: e4
http://xiptv.xxx:xxx/c/

Another, if you can also from these sites.

hxxs: //redecanaistv.com/assistir-record-tv-sp-online-24-horas-ao-vivo_c22659597.html

hxxs: //mega.nz/embed/RpARyI5I#a6rvXTD2Rfh6MWtvhEU0UOiiUN_f8N7QT9auwHJsQGE

Thank you very much in advance.
 

dantas1990

Member
Apr 10, 2020
51
1
8
HI

I would like to know if the REGEX possibility of a STB code please.
Example below:
MAC = 00: xx: xx: xx: xx: e4
http://xiptv.xxx:xxx/c/

Another, if you can also from these sites.

hxxs: //redecanaistv.com/assistir-record-tv-sp-online-24-horas-ao-vivo_c22659597.html
hXXps://redecanais.cloud/ok-ko-vamos-ser-herois-dublado-lista-de-episodios_4824ebece.html



Thank you very much in advance.
 

tungbeng95

Member
Oct 25, 2018
349
10
18

peterpan

Active member
Jul 7, 2013
117
84
28
Try this...It's working for now, but I'm not sure how long it'll last! The full regex requires "bearer" Authorization, which I'm not too familiar with :(



XML:
<item>
<title>ProTV 1</title>
<link>$doregex[CleanM3U8]|User-Agent=iPad</link>
<regex>
<name>CleanM3U8</name>
<expres>$pyFunction:'$doregex[getM3U8]'.replace('\/','/')</expres>
<page></page>
</regex>
<regex>
<name>getM3U8</name>
<expres>(http.*?m3u8)</expres>
<page>https://media.cms.protvplus.ro/embed/9w1VHN18dnM?autoplay=1</page>
<referer>https://protvplus.ro/tv-live/1-pro-tv</referer>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

adioukrou

Member
May 12, 2012
36
0
6
hxxx://line.hi-ott.com:80/9118313114883/AhCXzrGaDu6ZdOd/98547

Plays for 30 seconds . I even tried the f4m-tester thing but did not work.
-VLC / KODI same result.
So guys I need your help to resolve this if any. Thanks and happy holidays.
 

m5Germany

Active member
Mar 20, 2014
181
48
28
Greetings, Having trouble with the following:
LSP XML:
<item>
<title>5.00p [COLOR=FF00FFFF]FOX News [COLOR=blue]•[/COLOR][COLOR=FF00CCFF] 123news.tv[/COLOR][/COLOR]</title>
<thumbnail>https://i.pinimg.com/originals/b2/b9/73/b2b973972a1af698b11d95f9f319a4d6.jpg</thumbnail>
<fanart>https://www.broadcastingcable.com/.image/t_share/MTU4Nzc0ODkxMjQ2NTI4MTYx/fox-news-channel-logo.jpg</fanart>
<link>$doregex[getSERV]$doregex[getSERV2]|User-Agent=iPad&amp;Referer=https://123news.tv/</link>
<regex>
<name>getSERV</name>
<expres>(ht[^\s]+)</expres>
<page>$doregex[getUrl]</page>
<referer>https://123news.tv/</referer>
</regex>
<regex>
<name>getSERV2</name>
<expres>(\/F[^\s]+)</expres>
<page>$doregex[getUrl]</page>
<referer>https://123news.tv/</referer>
</regex>
<regex>
<name>getUrl</name>
<expres>$pyFunction:'$doregex[get-atob]'.decode('base64')</expres>
<page></page>
<referer></referer>
</regex>
<regex>
<name>get-atob</name>
<expres>var filePath = atob\('([^']+)'</expres>
<page>https://123news.tv/fox-news-live-stream/</page>
<referer>https://123news.tv/</referer>
</regex>
</item>
Any ideas where I went wrong?
m5
 

streamwatcher2013

Well-known member
Oct 24, 2013
897
383
63
USA
FOX News is not good any more they get scared by CCP. Newsmax and OAN is the true source to watch for now. Try this:

LSP XML:
<item>
<title>https://123news.tv/fox-news</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  stream=re.findall('id=.player[\w\W]*?atob.[\'"]([^\'"]+)',page_data)[0].decode('base64')
  val=re.findall('([^\s*$]+)',stream)
  netloc=val[0].rstrip();path=val[1].lstrip()
  return '%s%s|user-agent=ipad&referer=https://123news.tv/'%(netloc,path)
]]></expres>
<page>https://123news.tv/fox-news-live-stream/</page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
897
383
63
USA
In case they removed the empty line:

LSP XML:
<item>
<title>Fox News</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  stream=re.findall('id=.player[\w\W]*?atob.[\'"]([^\'"]+)',page_data)[0].decode('base64')
  if '\n' in stream:
    val=re.findall('([^\s*$]+)',stream)
    netloc=val[0].rstrip();path=val[1].lstrip()
    return '%s%s|user-agent=ipad&referer=https://123news.tv/'%(netloc,path)
  else:
    return '%s|user-agent=ipad&referer=https://123news.tv/'%stream
]]></expres>
<page>https://123news.tv/fox-news-live-stream/</page>
</regex>
</item>
 
  • Like
Reactions: m5Germany

m5Germany

Active member
Mar 20, 2014
181
48
28
LSP XML:
<item>
<title>https://sports24.club/tv/v?id=nbcsn&us=1</title>
<thumbnail></thumbnail>
<fanart></fanart>
<link>$doregex[m5]|User-Agent=iPad&amp;Referer=https://sports24.club/tv/v?id=nbcsn&amp;us=1</link>
<regex>
<name>m5</name>
<expres>$pyFunction:'$doregex[getATOB]'.decode('base64')</expres>
<page></page>
</regex>
<regex>
<name>getATOB</name>
<expres><![CDATA[atob\('([^']+)]]></expres>
<page>https://sports24.club/tv/v?id=nbcsn&amp;us=1</page>
<referer>https://sports24.club/</referer>>
</regex>
</item>

Enjoy,
m5
 
  • Like
Reactions: tungbeng95

disaresta43

New member
May 18, 2016
16
0
1
Good Evening,

i need help with

Code:
https://www.canlitv.today/kanal-7
my old one doesn't work anymore and i can't fix it.

Thank you very much in advance.
 

BymemoLee

Member
Apr 30, 2018
90
18
8
XML:
<item>
<title>[B]SITE EMBED | [COLOR cyan]KANAL 7[/COLOR][/B]</title>
<link>$doregex[url]</link>
<regex>
<name>url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests, unwise
  link = re.findall('iframe.+?src="([^"]+)',page_data)[0]
  page_data = requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://www.canlitv.today/kanal-7','accept':'*/*'}).content
  while 'w,i,s,e' in page_data:
      page_data = unwise.unwise_process(page_data)
  strurl,res = re.findall('file:\s*[\'"](.+?([^/]+).m3u8[^\'"]+)', page_data)[0]
  if '720"' in page_data:
     return strurl.replace(res,'%s720'%res)+'|user-agent=ipad&referer='+link
  elif '480"' in page_data:
     return strurl+'|user-agent=ipad&referer='+link
  elif '360"' in page_data:
     return strurl.replace(res,'%s360'%res)+'|user-agent=ipad&referer='+link
  else:
     return strurl+'|user-agent=ipad&referer='+link
]]></expres>
<page>https://www.canlitv.today/kanal-7</page>
<referer>https://www.canlitv.today/</referer>
</regex>
</item>
 
  • Like
Reactions: disaresta43

BymemoLee

Member
Apr 30, 2018
90
18
8
Need regex for this channel
Code:
hxxps://sportsbay.org/watch/67185/1/bt-sport-1-live.html
 

m5Germany

Active member
Mar 20, 2014
181
48
28
Curious to see if this can be Coded as well. Maybe "domains"? Previously, @gujal remarked on this in Post#7. https://www.tvaddons.co/community/threads/lsp-regex-makelist-discussion.62925/post-431715
Here's what I see:
LSP XML:
GET https://telerium.club/streams/33403/1609347300000.json HTTP/1.1
Host: telerium.club
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Accept: */*
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://telerium.club/embed/33403.html
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: volume=0

Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: __cfduid=d5d7093d3ee41612330aeaaf7ae071e401609260922; expires=Thu, 28-Jan-21 16:55:22 GMT; path=/; domain=.telerium.club; HttpOnly; SameSite=Lax; Secure
X-Proxy-Cache: MISS
Cache-Control: public, max-age=1800, s-maxage=30
Referrer-Policy: no-referrer-when-downgrade
CF-Cache-Status: MISS
cf-request-id: 0751060d5800002568b5083000000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=kTmJ7gusWBTfJqizTYLr6VadX3u%2F2XmzFmdtOX5DzNck%2Bw0l55s1cYIZMckT1n0Q9P8Nrwm5KH9tPaPZBGXCJK89csgpBU4s0VKd2u%2BG"}],"group":"cf-nel","max_age":604800}
NEL: {"report_to":"cf-nel","max_age":604800}
Vary: Accept-Encoding
Server: cloudflare
CF-RAY: 60950c5bb8c12568-IAD
Content-Length: 491

{"domains":"bmV3ZG1uLmljdSxsYXlsb3cuY3lvdSxsb3dlbmQueHl6LGhpZW5kLnh5eixoaWVuYS5jbHViLGtpbmdrby54eXosbWlrZWFtaWdvcmVpbi54eXosY2xvdWRwbGFuZS54eXosbGl2ZS1nb2xmLnN0cmVhbSxib3gtbGl2ZS5zdHJlYW0sZXNwbi1saXZlLnN0cmVhbSx3d3cuam9rZXJsaXZlc3RyZWFtLmNvbSxqb2tlcmxpdmVzdHJlYW0uY29t","watermark":"\/\/rolo.nocdnrlly.xyz\/tele.png","url":"\/\/e8.stephn.xyz\/ingest09\/33403.m3u8?sf=NlNwczEwU2JE","tokenurl":"\/ingest09\/33403.m3u8?sf=NlNwczEwU2JE&token=ikhpIqvOlV7-3TvFz8WpZQ&expires=1609261162&rnd=33403"}
Be well,
m5
 

gujal

Developer
Dec 26, 2013
509
276
63
@m5Germany @BymemoLee
domains is just a base64 encoded list of domains that can use this embed. If you decode the domains value this is what you get and is irrelevant :)
newdmn.icu,laylow.cyou,lowend.xyz,hiend.xyz,hiena.club,kingko.xyz,mikeamigorein.xyz,cloudplane.xyz,live-golf.stream,box-live.stream,espn-live.stream,www.jokerlivestream.com,jokerlivestream.com
This should work when the stream is online
LSP XML:
<item>
<title>Telerium New</title>
<link>$doregex[getURL]</link>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m, url='https://telerium.club/embed/33403.html'):
  import requests, time, urllib
  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',
             'Referer': url}
  atime = '/{0}.json'.format(int((int(time.time()) + 86400) * 1000))
  eurl = url.replace('/embed/', '/streams/').replace('.html', atime)
  r = requests.get(eurl, headers=headers).json()
  strurl = r.get('url')
  if r.get('tokenurl'):
    strurl += requests.get('https://telerium.club' + r.get('tokenurl'), headers=headers).json()[10][::-1]
  strurl = strurl if strurl.startswith('http') else 'https:' + strurl
  return strurl + '|{0}'.format(urllib.urlencode(headers))
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: BymemoLee

m5Germany

Active member
Mar 20, 2014
181
48
28
Thanks for the Code. I should have been more accurate when I stated "domains". I should have said after "domains" meaning:
"url":"\/\/e8.stephn.xyz\/ingest09\/33403.m3u8?sf=NlNwczEwU2JE","tokenurl":"\/ingest09\/33403.m3u8?sf=NlNwczEwU2JE&token=ikhpIqvOlV7-3TvFz8WpZQ&expires=1609261162&rnd=33403
But you figured it out anyway as I knew you could.
Did notice one thing; when I look in Kodi Log everything shows as expected - but - it shows:&expires=1609261162&rnd= and not &expires=1609261162&rnd=33403
Not sure if the 33403 is needed or not. I'll give it a try when it is active.
As Always, Thanks.
m5
 

m5Germany

Active member
Mar 20, 2014
181
48
28
Disregard my question on rnd=33403 above. Tested using:
Info:
NBC Sports Network: https://sportsbay.org/watch/69183/1/nbc-sports-network-live.html
https://telerium.club/embed/33455.html from https://newdmn.icu/stream/2/69183.html

Damn your good. But you know that.
As Always, Thanks.
m5
 

peterpan

Active member
Jul 7, 2013
117
84
28
Here you go...

XML:
<item>
<title>https://www.rtvs.sk/televizia/live-1</title>
<link>$doregex[PlayCleanStream]|User-Agent=iPad</link>
<regex>
<name>PlayCleanStream</name>
<expres>$pyFunction:'$doregex[getStream]'.replace('\n','')</expres>
<page></page>
</regex>
<regex>
<name>getStream</name>
<expres>"src" : "(.*?)"</expres>
<page>https:$doregex[getVarURLHeader]&amp;b=mozilla&amp;p=win&amp;v=84&amp;f=1&amp;d=1</page>
<referer>https://www.rtvs.sk/televizia/live-1</referer>
<x-req>XMLHttpRequest</x-req>
<Cookie_Jar></Cookie_Jar>
</regex>
<regex>
<name>getVarURLHeader</name>
<expres>var url = "(.*?)&amp;</expres>
<page>https://www.rtvs.sk/televizia/live-1</page>
<Cookie_Jar></Cookie_Jar>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

tungbeng95

Member
Oct 25, 2018
349
10
18
@peterpan can you help me this final.Tks.
Code:
https://www.olympicchannel.com/en/live/?slug=oc1
 

gujal

Developer
Dec 26, 2013
509
276
63
Enjoy!

LSP XML:
<item>
<title>Olympic Channels</title>
<link>$doregex[makelist]</link>
<thumbnail></thumbnail>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param1][/COLOR]</title>
  <inputstream>$doregex[getURL]</inputstream>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import requests, time
  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',
             'Referer': 'https://www.olympicchannel.com/'}
  url = 'https://www.olympicchannel.com/en/api/v1/d3vp/epgchannels/linear/live-channels?_={0}'
  url = url.format(int(time.time() * 1000))
  jdata = requests.get(url, headers=headers).json()
  items = [(x['title'], x['src']) for x in jdata]
  return items
]]></expres>
<page></page>
</regex>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m, surl='[makelist.param2]'):
  import requests, time, urllib
  from urlparse import urlparse
  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',
             'Referer': 'https://www.olympicchannel.com/'}
  eurl = 'https://www.olympicchannel.com/OcsTokenization/api/v1/tokenizedUrl?url={0}&domain={1}&_ts={2}'
  sp = urlparse(surl)
  origin = '{0}://{1}'.format(sp.scheme, sp.netloc)
  eurl = eurl.format(surl, origin, int(time.time() * 1000))
  strurl = requests.get(eurl, headers=headers).json()
  return '{0}|{1}'.format(strurl, urllib.urlencode(headers))
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

Catmantx

Member
Nov 2, 2020
55
3
8
Can you help with this please?
Code:
https://www.digi24.ro/live/digi24
 

gujal

Developer
Dec 26, 2013
509
276
63
Enjoy!

LSP XML:
<item>
<title>Digi 24</title>
<inputstream>$doregex[getURL]</inputstream>
<thumbnail>https://www.digi24.ro/static/theme-repo/bin/images/digi24-logo.png</thumbnail>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m, url='https://telerium.club/embed/25553.html'):
  import requests, urllib
  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',
             'Referer': 'https://www.digi24.ro/'}
  eurl = "https://balancer2.digi24.ro/streamer.php?&scope=digi24&key={0}&outputFormat=json&type=abr&quality=hq"
  eurl = eurl.format(page_data)
  r = requests.get(eurl, headers=headers).json()
  strurl = r.get('file')
  return '{0}|{1}'.format(strurl, urllib.urlencode(headers))
]]></expres>
<page>https://balancer2.digi24.ro/streamer/make_key.php</page>
<referer>https://www.digi24.ro/</referer>
</regex>
</item>
 
  • Like
Reactions: Catmantx

m5Germany

Active member
Mar 20, 2014
181
48
28
Greetings, I can Fiddler to get the .m3u8 - but - can't RegEx it.
LSP XML:
http://freestreams-live1.com/skyf1-s3/

<item>
<title>Get Server Test</title>
<link>$doregex[anything]</link>
<regex>
<name>anything</name>
<expres><![CDATA[in><link\shref="([^"]+)"]]></expres>
<page>https://www.plytv.me/sdembed?v=skyf1hd~skyf1sd</page>
<referer>http://freestreams-live1.com/</referer>
</regex>
</item>

Should return: https://e16.dotice.me - but - kodi.log shows: object is not iterable 
(e16 is dynamic and that's what I can not Code.)
Might have to do with: https://key.seckeyserv.me

<item>
<title>[COLOR=FF00FFFF]F1 Sky Sports [COLOR=red]•[/COLOR][COLOR=FF00CCFF] www.plytv.me[/COLOR][/COLOR]</title>
<link>https://e16.dotice.me/plyvivo/DiYKPETXUs7dSCg2lJBh/playlist.m3u8|User-Agent=Mozilla/5.0&amp;Referer=https://www.plytv.me/sdembed?v=skyf1hd~skyf1sd</link>
<fanart>https://greasengasoline.files.wordpress.com/2012/03/b11b164b148b374159c2fd650a2c6440.jpg</fanart>
<thumbnail>https://2.bp.blogspot.com/-O6QlcjaE3eI/WUM_fg9BrfI/AAAAAAAAGqc/lPRU-X3O93sTp2rcylqL_C1O3k4Mzvg_ACLcBGAs/s1600/sky_uk_sports_f1.png</thumbnail>
</item>
Anyway, it would be nice if someone would check to see if this can be Coded.
Thanks in advance.
m5
 

peterpan

Active member
Jul 7, 2013
117
84
28
This is a POST request, so you need the <rawpost> code :) This will get you the server you need...

XML:
<item>
<title>Get Server Test</title>
<link>$doregex[getServer]</link>
<regex>
<name>getServer</name>
<expres><![CDATA[in><link\shref="([^"]+)"]]></expres>
<page>https://www.plytv.me/sdembed?v=skyf1hd~skyf1sd|Upgrade-Insecure-Requests=1</page>
<referer>https://embedstream.me/sky-sports-f1-sky-f1-stream-1</referer>
<rawpost>pid=13&amp;ptxt=gt%3DSky+Sports+F1+%7C+Sky+F1%26gc%3DF1</rawpost>
<Origin>https://embedstream.me</Origin>
<cookieJar></cookieJar>
</regex>
</item>
 
  • Like
Reactions: m5Germany

dantas1990

Member
Apr 10, 2020
51
1
8
HI

I would like to know if the REGEX possibility of a STB code please.
Example below:
MAC = 00: xx: xx: xx: xx: e4
http://xiptv.xxx:xxx/c/

Another, if you can also from these sites.

hxxs: //redecanaistv.com/assistir-record-tv-sp-online-24-horas-ao-vivo_c22659597.html
hXXps://redecanais.cloud/ok-ko-vamos-ser-herois-dublado-lista-de-episodios_4824ebece.html



Thank you very much in advance.
 

Catmantx

Member
Nov 2, 2020
55
3
8
Dear gujal, again Thank you for providing the code for :
Code:
https://www.digi24.ro/live/digi24
Code:
<item>
<title>Digi 24</title>
<inputstream>$doregex[getURL]</inputstream>
<thumbnail>https://www.digi24.ro/static/theme-repo/bin/images/digi24-logo.png</thumbnail>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m, url='https://telerium.club/embed/25553.html'):
  import requests, urllib
  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',
             'Referer': 'https://www.digi24.ro/'}
  eurl = "https://balancer2.digi24.ro/streamer.php?&scope=digi24&key={0}&outputFormat=json&type=abr&quality=hq"
  eurl = eurl.format(page_data)
  r = requests.get(eurl, headers=headers).json()
  strurl = r.get('file')
  return '{0}|{1}'.format(strurl, urllib.urlencode(headers))
]]></expres>
<page>https://balancer2.digi24.ro/streamer/make_key.php</page>
<referer>https://www.digi24.ro/</referer>
</regex>
</item>
WORKS GREAT!!!

Small request if is possible:
I would like to be able to use an m3u list to call the LSP regex from "plugin.video.live.streamspro".

What is the correct code?

Ex:
Code:
#EXTM3U
#EXTINF:-1 ,Digi 24
plugin://plugin.video.live.streamspro/?mode=1&url= (????????)
Thank you in advance.

Cat
 

gujal

Developer
Dec 26, 2013
509
276
63
The plugin method to call LSP on such large regex is not manageable.
For Digi24, the code is
plugin://plugin.video.live.streamspro/?url=%24doregex%5BgetURL%5D%26mode%3D20&mode=17&regexs=%7Bu%27getURL%27%3A%20%7B%27expres%27%3A%20u%27%23%24pyFunction%5Cndef%20GetLSProData%28page_data%2CCookie_Jar%2Cm%5C%27%29%3A%5Cn%20%20import%20requests%2C%20urllib%5Cn%20%20headers%20%3D%20%7B%5C%27User-Agent%5C%27%3A%20%5C%27Mozilla/5.0%20%28Windows%3B%20U%3B%20Windows%20NT%205.1%3B%20en-GB%3B%20rv%3A1.9.0.3%29%20Gecko/2008092417%20Firefox/3.0.3%5C%27%2C%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%5C%27Referer%5C%27%3A%20%5C%27https%3A//www.digi24.ro/%5C%27%7D%5Cn%20%20eurl%20%3D%20%22https%3A//balancer2.digi24.ro/streamer.php%3F%26scope%3Ddigi24%26key%3D%7B0%7D%26outputFormat%3Djson%26type%3Dabr%26quality%3Dhq%22%5Cn%20%20eurl%20%3D%20eurl.format%28page_data%29%5Cn%20%20r%20%3D%20requests.get%28eurl%2C%20headers%3Dheaders%29.json%28%29%5Cn%20%20strurl%20%3D%20r.get%28%5C%27file%5C%27%29%5Cn%20%20return%20%5C%27%7B0%7D%7C%7B1%7D%5C%27.format%28strurl%2C%20urllib.urlencode%28headers%29%29%5Cn%27%2C%20%27referer%27%3A%20u%27https%3A//www.digi24.ro/%27%2C%20%27name%27%3A%20u%27getURL%27%2C%20%27page%27%3A%20u%27https%3A//balancer2.digi24.ro/streamer/make_key.php%27%7D%7D
 

gujal

Developer
Dec 26, 2013
509
276
63
Also there is a unused stuff in the code which can be edited
Code:
def GetLSProData(page_data,Cookie_Jar,m, url='https://telerium.club/embed/25553.html'):
This line should be
Code:
def GetLSProData(page_data,Cookie_Jar,m):
And with that change, the plugin method would be
plugin://plugin.video.live.streamspro/?mode=17&url=%24doregex%5BgetURL%5D%26mode%3D20&regexs=%7Bu%27getURL%27%3A%20%7B%27expres%27%3A%20u%27%23%24pyFunction%5Cndef%20GetLSProData%28page_data%2CCookie_Jar%2Cm%29%3A%5Cn%20%20import%20requests%2C%20urllib%5Cn%20%20headers%20%3D%20%7B%5C%27User-Agent%5C%27%3A%20%5C%27Mozilla/5.0%20%28Windows%3B%20U%3B%20Windows%20NT%205.1%3B%20en-GB%3B%20rv%3A1.9.0.3%29%20Gecko/2008092417%20Firefox/3.0.3%5C%27%2C%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%5C%27Referer%5C%27%3A%20%5C%27https%3A//www.digi24.ro/%5C%27%7D%5Cn%20%20eurl%20%3D%20%22https%3A//balancer2.digi24.ro/streamer.php%3F%26scope%3Ddigi24%26key%3D%7B0%7D%26outputFormat%3Djson%26type%3Dabr%26quality%3Dhq%22%5Cn%20%20eurl%20%3D%20eurl.format%28page_data%29%5Cn%20%20r%20%3D%20requests.get%28eurl%2C%20headers%3Dheaders%29.json%28%29%5Cn%20%20strurl%20%3D%20r.get%28%5C%27file%5C%27%29%5Cn%20%20return%20%5C%27%7B0%7D%7C%7B1%7D%5C%27.format%28strurl%2C%20urllib.urlencode%28headers%29%29%5Cn%27%2C%20%27referer%27%3A%20u%27https%3A//www.digi24.ro/%27%2C%20%27name%27%3A%20u%27getURL%27%2C%20%27page%27%3A%20u%27https%3A//balancer2.digi24.ro/streamer/make_key.php%27%7D%7D
 
  • Like
Reactions: Catmantx

Catmantx

Member
Nov 2, 2020
55
3
8
Dear gujal,
For:
Code:
https://protvplus.ro/tv-live/1-pro-tv
peterpan provided this script that works great:
Code:
<item>
<title>ProTV 1</title>
<link>$doregex[CleanM3U8]|User-Agent=iPad</link>
<regex>
<name>CleanM3U8</name>
<expres>$pyFunction:'$doregex[getM3U8]'.replace('\/','/')</expres>
<page></page>
</regex>
<regex>
<name>getM3U8</name>
<expres>(http.*?m3u8)</expres>
<page>https://media.cms.protvplus.ro/embed/9w1VHN18dnM?autoplay=1</page>
<referer>https://protvplus.ro/tv-live/1-pro-tv</referer>
</regex>
</item>
I tried to follow your "The plugin method to call LSP" and I came up with this:
plugin://plugin.video.live.streamspro/?url=%24doregex%5BCleanM3U8%5D%7CUser-Agent%3DiPad&amp;mode=17&amp;regexs=%7Bu%27getM3U8%27%3A%20%7B%27expres%27%3A%20u%27%28http.%2A%3Fm3u8%29%27%2C%20%27referer%27%3A%20u%27https%3A//protvplus.ro/tv-live/1-pro-tv%27%2C%20%27name%27%3A%20u%27getM3U8%27%2C%20%27page%27%3A%20u%27https%3A//media.cms.protvplus.ro/embed/9w1VHN18dnM%3Fautoplay%3D1%27%7D%2C%20u%27CleanM3U8%27%3A%20%7B%27expres%27%3A%20u%22%24pyFunction%3A%27%24doregex%5BgetM3U8%5D%27.replace%28%27%5C%5C/%27%2C%27/%27%29%22%2C%20%27name%27%3A%20u%27CleanM3U8%27%2C%20%27page%27%3A%20None%7D%7D

It doesn't work. PLEASE, whenever you have some time take a look and let me know what am I doing wrong.

Thank you!
 

gujal

Developer
Dec 26, 2013
509
276
63
You have to replace &amp; with &
plugin://plugin.video.live.streamspro/?url=%24doregex%5BCleanM3U8%5D%7CUser-Agent%3DiPad&mode=17&regexs=%7Bu%27getM3U8%27%3A%20%7B%27expres%27%3A%20u%27%28http.%2A%3Fm3u8%29%27%2C%20%27referer%27%3A%20u%27https%3A//protvplus.ro/tv-live/1-pro-tv%27%2C%20%27name%27%3A%20u%27getM3U8%27%2C%20%27page%27%3A%20u%27https%3A//media.cms.protvplus.ro/embed/9w1VHN18dnM%3Fautoplay%3D1%27%7D%2C%20u%27CleanM3U8%27%3A%20%7B%27expres%27%3A%20u%22%24pyFunction%3A%27%24doregex%5BgetM3U8%5D%27.replace%28%27%5C%5C/%27%2C%27/%27%29%22%2C%20%27name%27%3A%20u%27CleanM3U8%27%2C%20%27page%27%3A%20None%7D%7D
 

BymemoLee

Member
Apr 30, 2018
90
18
8
Can you help site this please?
Code:
hxxps://maksibet.tv/canli/bein-sports-1
 

gujal

Developer
Dec 26, 2013
509
276
63
Enjoy!

LSP XML:
<item>
<title>Bein Sports 1 (MaksiBet)</title>
<link>$doregex[getURL]</link>
<thumbnail></thumbnail>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, jsunhunt, base64, urllib
  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',
             'Referer': 'https://maksibet.tv/',
             'Origin': 'https://maksibet.tv'}
  pdata = re.findall('atob\("([^"]+)', page_data)[0]
  pdata = base64.b64decode(pdata)
  if jsunhunt.detect(pdata):
    pdata = jsunhunt.unhunt(pdata)
  strurl = re.findall("src:\s*'([^']+)", pdata)[0]
  return '{0}|{1}'.format(strurl, urllib.urlencode(headers))
]]></expres>
<page>https://maksibet.tv/tv/bein-sports-1</page>
<referer>https://maksibet.tv/</referer>
</regex>
</item>
 
  • Like
Reactions: altug and BymemoLee

m5Germany

Active member
Mar 20, 2014
181
48
28
Greetings, When I view-source it shows 2 .m3u8's. Tried to capture and get nothing - object is not iterable. Search function not working in tvaddons - so - could not research. (Yes. I tried other search methods and sites. )
LSP XML:
view-source:https://www.stream4free.live/american-dad-hd

<video id="live_player" class="video-js vjs-default-skin vjs-16-9 vjs-live vjs-live-display vjs-big-play-centered" width="100%" height="100%" poster="/images/playerbackground/american.jpg" autoplay controls preload="auto" data-setup='{}'>
<source src="https://sv2.data-stream.top/ea5468e67bafc2a8a80d3aacc2c9af2d49fadcbd0f641abfb4d29a4398821f46/hls/americanxxx.m3u8" type="application/x-mpegURL">
<source src="https://sv2.data-stream.top/ea5468e67bafc2a8a80d3aacc2c9af2d49fadcbd0f641abfb4d29a4398821f46/hls/americanxxx.m3u8" type="video/mp4">
</video>
I vaugly remember reading that the site can not be Coded. Is it still true?
As Alway's, Thanks.
m5
 

m5Germany

Active member
Mar 20, 2014
181
48
28
LSP XML:
<item>
<title>stream4free.live</title>
<link>$doregex[getANYTHING]</link>
<regex>
<name>getANYTHING</name>
<expres><![CDATA[(.*?)]]></expres>
<page>https://www.stream4free.live/american-dad-hd</page>
<referer>https://www.stream4free.live/</referer>
</regex>
</item>
 
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5