LSP Regex & Makelist Discussion.

m5Germany

Active member
Mar 20, 2014
352
115
43
Greetings - Would someone Please take a look? I must be having writers block. Thanks, m5
Info:
Having trouble getting https://2ndrun.tv/fox-news/
Fiddler shows https://www.shidurlive.com/embed.js Can't see it in view-source:
embed.js has 'zed' and 'hexEncode' in eval(function to go to next step
Then goes to eval(function https://www.shidurlive.com/embed/
Which goes to eval(function for Final.
 

m5Germany

Active member
Mar 20, 2014
352
115
43
Update: Figured it out - but - can't RegEx numerical value between $doregex[zed]/ and $doregex[hex] in <name>m2</name>
Seems to be static - but - not sure
LSP3 XML:
<item>
<title>FOX News 2ndrun.tv</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Accept=*/*&amp;Origin=https://www.shidurlive.com&amp;Referer=https://www.shidurlive.com/</link>
<regex>
<name>m5</name>
<expres>Src\s*=\s*'([^']+)</expres>
<page>$doregex[m4]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m4</name>
<expres>$pyFunction:get_unpacked(page_data,'(eval.*m3u8.*)')</expres>
<page>https://www.shidurlive.com/embed/$doregex[m3]|Upgrade-Insecure-Requests=1</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m3</name>
<expres>$pyFunction:'$doregex[m2]'.replace('|','/')</expres>
<page />
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m2</name>
<expres>var.zed.([^']+)</expres>
<page>https://www.shidurlive.com/a/$doregex[zed]/3130322c3131302c39392c34352c35302c3131302c3130302c3131342c3131372c3131302c3131362c313138$doregex[hex]/855/481|Upgrade-Insecure-Requests=1</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>hex</name>
<expres>hex.*?'([^']+)</expres>
<page>$doregex[m1]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>zed</name>
<expres>zed\s*=\s*'([^\/]+)</expres>
<page>$doregex[m1]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m1</name>
<expres>$pyFunction:get_unpacked(page_data,'(eval.*zed.*)')</expres>
<page>https://www.shidurlive.com/embed.js</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<info>https://2ndrun.tv/fox-news/</info>
</item>
 

gujal

Developer
Dec 26, 2013
610
334
63
@m5Germany The numerical value is built using the embed channel name from the main page. The zed and hex are static values from the javascript so can be hardcoded
Here is the code with the logic to build the numericstring from the embed channel name
LSP XML:
<item>
<title>FOX News 2ndrun.tv</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[m5]|User-Agent=iPad</link>
<regex>
<name>m5</name>
<expres>Src\s*=\s*'([^']+)</expres>
<page>$doregex[m4]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m4</name>
<expres>$pyFunction:get_unpacked(page_data,'(eval.*m3u8.*)')</expres>
<page>https://www.shidurlive.com/embed/$doregex[m3]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m3</name>
<expres>$pyFunction:'$doregex[m2]'.replace('|','/')</expres>
<page />
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m2</name>
<expres>var.zed.([^']+)</expres>
<page>$doregex[m1]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m1</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data, Cookie_Jar, m):
  import re
  import binascii
  channel, width, height = re.findall('{channel:\s*"([^"]+)",width:\s*"([^"]+)",height:\s*"([^"]+)', page_data)[0]
  xed = ""
  lengthint = len(channel) - 1
  for i in range(len(channel)):
    xed += str(ord(channel[i]))
    if i != lengthint:
      xed += ","
  zed = 'd5c94e01ba02eaff/' + binascii.hexlify(xed) + '/78102150b37b507a7bafe9d5e17892ba202cbd369baf5d494bdaffbc9e4eb961'
  eurl = 'https://www.shidurlive.com/a/' + zed + '/' + width + '/' + height 
  return eurl
]]></expres>
<page>https://2ndrun.tv/fox-news/</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<info>https://2ndrun.tv/fox-news/</info>
</item>
 

gujal

Developer
Dec 26, 2013
610
334
63
Actually m1 section can be simplified further as below
Code:
<regex>
<name>m1</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data, Cookie_Jar, m):
  import re
  import binascii
  channel, width, height = re.findall('{channel:\s*"([^"]+)",width:\s*"([^"]+)",height:\s*"([^"]+)', page_data)[0]
  xed = [str(ord(x)) for x in channel]
  xed = ','.join(xed)
  zed = 'd5c94e01ba02eaff/' + binascii.hexlify(xed) + '/78102150b37b507a7bafe9d5e17892ba202cbd369baf5d494bdaffbc9e4eb961'
  eurl = 'https://www.shidurlive.com/a/' + zed + '/' + width + '/' + height 
  return eurl
]]></expres>
<page>https://2ndrun.tv/fox-news/</page>
<referer>https://2ndrun.tv/</referer>
</regex>
 

m5Germany

Active member
Mar 20, 2014
352
115
43
Hmm, This is awkward - I never thought I'd say this - but - neither Code is not working on my side. Additionally, I have ResolveURL v1.0.0 installed and when looking to update - the only option shown is SMR Link Tester (which I have Disabled). I noticed new version script.module.resolveurl-5.1.53.zip from 3 day's ago. Should I be able to install new version from ResolveURL Repo or do I have to download the updated zip and install manually? Maybe I'm not looking in the correct location. Is it in Video add-ons in ResolveURL Repo? I did notice that if I go to SMR Link Tester an look under Dependencies, it allows me. Should I get a notification that there is an Update like I do for other Kodi add-ons or do I have to check:
h tps://github.com/Gujal00/smrzips/tree/master/zips/script.module.resolveurl periodically?
 

gujal

Developer
Dec 26, 2013
610
334
63
@m5Germany Kodi 19 and above has repository affinity security meaning if you install an addon from a repository, it will then get updates only from that repository. If you install from zip, even though you install the associated repo for that addon later it will not update automatically. So you have to update the addon from the repo manually once and from then on it will get auto updates.
So in your case I suspect you installed the repo after installing resolveurl from zip. All you have to do is now goto Kodi Settings -> System -> Make sure settings level is Advanced or Expert -> Add-ons -> Manage Dependencies -> ResolveURL -> Versions -> and select the one from resolveurl repository. Once done from then on it will auto update when ever there is a new release.

As far as the above XML, my mistake, didnt test properly in kodi19. Here is the working code, Enjoy!

LSP XML:
<item>
<title>FOX News 2ndrun.tv</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[m5]|User-Agent=iPad</link>
<regex>
<name>m5</name>
<expres>Src\s*=\s*'([^']+)</expres>
<page>$doregex[m4]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m4</name>
<expres>$pyFunction:get_unpacked(page_data,'(eval.*m3u8.*)')</expres>
<page>https://www.shidurlive.com/embed/$doregex[m3]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m3</name>
<expres>$pyFunction:'$doregex[m2]'.replace('|','/')</expres>
<page />
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m2</name>
<expres>var.zed.([^']+)</expres>
<page>$doregex[m1]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m1</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data, Cookie_Jar, m):
  import re
  import binascii
  channel, width, height = re.findall('{channel:\s*"([^"]+)",width:\s*"([^"]+)",height:\s*"([^"]+)', page_data)[0]
  xed = [str(ord(x)) for x in channel]
  xed = binascii.hexlify(','.join(xed).encode('ascii')).decode('ascii')
  zed = 'd5c94e01ba02eaff/' + xed + '/78102150b37b507a7bafe9d5e17892ba202cbd369baf5d494bdaffbc9e4eb961'
  eurl = 'https://www.shidurlive.com/a/' + zed + '/' + width + '/' + height 
  return eurl
]]></expres>
<page>https://2ndrun.tv/fox-news/</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<info>https://2ndrun.tv/fox-news/</info>
</item>
 

m5Germany

Active member
Mar 20, 2014
352
115
43
Well, Thanks for checking Code - but - still throws Error on my side. Checked with Windows and Android boxes w/ 19.3 LSP3-a4
ERROR <general>: CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.live.streamspro/?url=
I've also noticed:
INFO <general>: [plugin.video.live.streamspro-3.0.0~alpha4]: Unsupported tag: cookieJar
INFO <general>: [plugin.video.live.streamspro-3.0.0~alpha4]: Unsupported tag: info

Secondly, I do not have ResolveUrl as an option under Manage Dependencies (see images).
Any ideas?
 

gujal

Developer
Dec 26, 2013
610
334
63
@m5Germany DOnt know whats happening on your side as there is no 'cookieJar' tag in use in the above code

As for ResolveURL is concerned, looks like you have not installed any addon that depends on it. For LSP it is only an optional stuff. So you have to install SMR Link Tester from ResolveURL Repository. This will install the addon along with its dependency which is ResolveURL. You will then see it in the manage dependencies screen
 

m5Germany

Active member
Mar 20, 2014
352
115
43
Figured out 'cookieJar' If I change it to 'cookiejar' no Error. Was using <cookieJar> per lsprowiki <rawpost> example.
'cookieJar' was used on\in another Code I have on my Test Page.
Still no clue on <info> tag Error - not a big concern - but - thought you should know.

Also, From h tps://www.shidurlive.com/embed.js you have:
zed = 'd5c94e01ba02eaff/' + xed + '/78102150b37b507a7bafe9d5e17892ba202cbd369baf5d494bdaffbc9e4eb961'
When I read it from here, I get:
zed = 'cbfdfad4c4fefcf5/' + xed + '/df05f07fa067ea3ad0deeaf5faa27e9abac92d5d621ebaad4cfbf4a1aa34804a'
Changed zed to my values into your Code and it works on both machines\boxes\op systems.
So, zed must be variable per Location\IP?

Lastly, enabled SMR Link Tester, under dependencies installed ResolveUrl - then disabled SMR Link Tester.
Now go back into system -> Add-ons -> Manage Dependencies -> ResolveURL and it works.
 

gujal

Developer
Dec 26, 2013
610
334
63
Ah, so zed values are location dependent, in which case need to regex them from embed.js as you originally had

and yeah no camelcase in tags, they should always be lowercase.
Info is working as in the above code it shows on the LSP widelist view correctly, will check why it is showing as error in log
 

m5Germany

Active member
Mar 20, 2014
352
115
43
Sorry to bother you. Knowing that I can't write Python would you be so kind as to incorporate my RegEx of embed.js in your Code?
I like the fact that it captures numerical value between $doregex[zed]/ and $doregex[hex] in m2.

Again, Thank You for sharing your knowledge.

I probably have a thousand questions to ask - but - respect that your time is valuable and I do not wish to encumber.
 

gujal

Developer
Dec 26, 2013
610
334
63
@m5Germany Here is the code with no hardcoded values.
LSP XML:
<item>
<title>FOX News 2ndrun.tv</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[m5]|User-Agent=iPad</link>
<regex>
<name>m5</name>
<expres>Src\s*=\s*'([^']+)</expres>
<page>$doregex[m4]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m4</name>
<expres>$pyFunction:get_unpacked(page_data,'(eval.*m3u8.*)')</expres>
<page>https://www.shidurlive.com/embed/$doregex[m3]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m3</name>
<expres>$pyFunction:'$doregex[m2]'.replace('|','/')</expres>
<page></page>
</regex>
<regex>
<name>m2</name>
<expres>var.zed.([^']+)</expres>
<page>$doregex[m1]</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>m1</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data, Cookie_Jar, m, vars='$doregex[get-vars]'):
  import re
  import binascii
  channel, width, height = re.findall('{channel:\s*"([^"]+)",width:\s*"([^"]+)",height:\s*"([^"]+)', page_data)[0]
  xed = ','.join([str(ord(x)) for x in channel])
  xed = binascii.hexlify(xed.encode()).decode('ascii')
  vars = vars.split('|')
  eurl = 'https://www.shidurlive.com/a/{0}/{1}/{2}/{3}/{4}'.format(vars[0], xed, vars[-1], width, height)
  return eurl
]]></expres>
<page>https://2ndrun.tv/fox-news/</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<regex>
<name>get-vars</name>
<expres>zed.+?var\|(.+?Encode\|[^|]+)</expres>
<page>https://www.shidurlive.com/embed.js</page>
<referer>https://2ndrun.tv/</referer>
</regex>
<info>https://2ndrun.tv/fox-news/</info>
</item>
 
  • Like
Reactions: m5Germany

boomski2

Member
Aug 19, 2019
46
1
8
Hi, anyone can get this site regex code
Code:
https://ustvgo.tv/fxm/
 

gujal

Developer
Dec 26, 2013
610
334
63
Enjoy!

LSP XML:
<item>
<title>FX Movies</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[get-url]|User-Agent=iPad</link>
<regex>
<name>get-url</name>
<expres>(.*)</expres>
<page>https://ustvgo.tv/data.php</page>
<post>stream:$doregex[ch-id]</post>
<referer>https://ustvgo.tv/</referer>
</regex>
<regex>
<name>ch-id</name>
<expres>stream=([^']+)</expres>
<page>https://ustvgo.tv/fxm/</page>
<referer>https://ustvgo.tv/</referer>
</regex>
</item>
 

m5Germany

Active member
Mar 20, 2014
352
115
43
LSP3 XML:
<item>
<title>FX Movies</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[m5Server]</link>
<regex>
<name>m5Server</name>
<expres>$pyFunction:'$doregex[m5]' if '$doregex[m5]' != '' else '$doregex[get-url]'</expres>
<page/>
</regex>
<regex>
<name>m5</name>
<expres>hls_src='([^']+)</expres>
<page>https://ustvgo.tv$doregex[m4]</page>
<referer>https://ustvgo.tv/</referer>
</regex>
<regex>
<name>m4</name>
<expres>iframe\s*src='([^']+)</expres>
<page>https://ustvgo.tv/fxm/</page>
<referer>https://ustvgo.tv/</referer>
</regex>
<regex>
<name>get-url</name>
<expres>(.*)</expres>
<page>https://ustvgo.tv/data.php</page>
<post>stream:$doregex[ch-id]</post>
<referer>https://ustvgo.tv/</referer>
</regex>
<regex>
<name>ch-id</name>
<expres>stream=([^']+)</expres>
<page>https://ustvgo.tv/fxm/</page>
<referer>https://ustvgo.tv/</referer>
</regex>
</item>
 

undpnd tqucbo

Member
Jan 25, 2021
171
2
18
Can anyone help me for site & tk.
Code:
https://aovivo.pro/tv/assistir-telecine-premium-ao-vivo/
 

gujal

Developer
Dec 26, 2013
610
334
63
Enjoy!

LSP XML:
<item>
<title>Telecine Premium</title>
<thumbnail></thumbnail>
<link>$doregex[getUrl]|User-Agent=iPad&amp;Referer=https://player.aovivotv.xyz/</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data, Cookie_Jar, m):
  import re
  import jsunpack
  if jsunpack.detect(page_data):
    page_data = jsunpack.unpack(page_data)
  src = re.findall(r'src:\s*([^,]+)', page_data)[0]
  src = src.replace("\\'", "'")
  strurl = ''.join([chr(int(x.split('(')[-1][:-1])) if x.startswith('String') else x[1:-1].replace('\\\\', '\\') for x in src.split('+')])
  strurl = strurl.encode().decode('unicode-escape')
  if strurl.startswith('//'):
    strurl = 'https:' + strurl
  return strurl
]]></expres>
<page>https://player.aovivotv.xyz/channels/telecinepremium</page>
<referer>https://www.tibiadown.com/</referer>
</regex>
</item>
 

gujal

Developer
Dec 26, 2013
610
334
63
@undpnd tqucbo looks like there is a bug in the jsunpack included with lsp
change import jsunpack to from resolveurl.plugins.lib import jsunpack and if you have resolveurl installed, then it plays fine in 19.3 lsp3alpha4
 
  • Like
Reactions: undpnd tqucbo

arslion84

New member
Dec 31, 2015
10
0
1
Hi , can anybody fix this code ?


XML:
<item>
<title>youtube search</title>
<link>$doregex[makelist]</link>
 <regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param2]    [makelist.param3]  </title>
<link>plugin://plugin.video.youtube/play/?video_id=[makelist.param1]</link>
]]></listrepeat>
<expres>href="\/watch\?v=(.*?)".*?dir="ltr">(.*?)&lt;\/a.*?> -(.*?)&lt;</expres>
<page>https://www.youtube.com/results?search_query=tek+part+diziler+son+bolum</page>    <!-- More pages ?  CHANGE THIS ADRESS !! and nothing else  -->
</regex>
 </item>
 

undpnd tqucbo

Member
Jan 25, 2021
171
2
18
This code no longer working, can you fix it & tk!
Code:
<item>
<title>A1</title>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Accept=*/*&amp;Origin=https://photocall.tv&amp;Referer=https://photocall.tv/</link>
<regex>
<name>m5</name>
<expres>$pyFunction:base64.b64decode('$doregex[m4]').decode('utf8')</expres>
<page></page>
</regex>
<regex>
<name>m4</name>
<expres>var\s*str\s*=\s*window.atob.'([^']+)</expres>
<page>https://photocall.tv/$doregex[m3]|Upgrade-Insecure-Requests=1</page>
<connection>keep-alive</connection>
<agent>Mozilla/5.0</agent>
<accept>text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9</accept>
<referer>https://photocall.tv/</referer>
</regex>
<regex>
<name>m3</name>
<expres>href="(.*?antena1)"</expres>
<page>https://photocall.tv/|Upgrade-Insecure-Requests=1</page>
<connection>keep-alive</connection>
<agent>Mozilla/5.0</agent>
<accept>text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9</accept>
</regex>
</item>
 

m5Germany

Active member
Mar 20, 2014
352
115
43
Site made small change to their Code from ' to ". Change the following - New Code will capture both ' and "

From:
var\s*str\s*=\s*window.atob.'([^']+)
To:
var\s*str\s*=\s*window.atob.['"]([^'"]+)
 
  • Like
Reactions: undpnd tqucbo

tpoupi

Member
Jan 2, 2016
41
0
6
Thank you to help me to make this regex, please.

hyyps://photocall.tv/a2rg/bc?ch=telequebec
 

streamwatcher2013

Well-known member
Oct 24, 2013
993
450
63
USA
Try thi
LSP XML:
<item>
<title> Tele Quebec</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
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=.(.+?telequebec)',s.text)[0]
#  link='http://photocall.tv/'+re.findall('noovo.png[\w\W]+?href=.([^\'"]+)',s.text)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','host':'photocall.tv','referer':'http://photocall.tv/','accept':'*/*'},cookies=s.cookies).text
  if 'window.atob' in source:
    stream=base64.b64decode(re.findall('window.atob.+?[\'"]([^\'"]+)',source)[0]+'=').decode('utf-8')
    return '%s|user-agent=ipad&referer=%s'%(stream,link)
  else:
    stream=re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',source)[0];stream='https:'+stream if stream.startswith('//') else stream
    return '%s|user-agent=ipad&referer=%s'%(stream,link)
]]></expres>
<page></page>
</regex>
<thumbnail>https://www.vpnvision.com/wp-content/uploads/2019/07/tele-quebec-tv-chaine-canada-streaming-crunch-300x300.png</thumbnail>
</item>
s:
 
  • Like
Reactions: tpoupi

luhanmcs

New member
Oct 2, 2015
2
0
1
Is it possible to scrape a g-index? Help with regex if possible, thanks.
hxxps://multimidia00.luhanmcs.workers.dev/0:/_Originais/Filmes%20-%20Originais/
 

undpnd tqucbo

Member
Jan 25, 2021
171
2
18
Can you make it working on LSP & tk.
Code:
https://zeenews.india.com/marathi/live
with
Code:
https://useraction.zee5.com/token/live.php
 

tungbeng95

Member
Oct 25, 2018
392
16
18
I to try this but my code not working...Need someone teach me write it.
Code:
<item>
<title>https://zeenews.india.com/marathi/live</title>
<link>https://z5ams.akamaized.net/out/v1/915deae3b9024babbe4e35748e296d34/index.m3u8$doregex[getToken]|User-Agent=iPad</link>
<regex>
<name>getToken</name>
<expres>video_token":"([^"]+)</expres>
<page>https://useraction.zee5.com/token/live.php</page>
<referer>https://www.zee5.com/</referer>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

m5Germany

Active member
Mar 20, 2014
352
115
43
Greetings: The below Code will play stream - but - only for a short time. Did notice in Fiddler that the Site is using some sort of Load Rebalancer.
I remember "A LONG TIME AGO" we had to RegEx the Load Rebalancer and it is acting like Streams that would play for 7-8 sec. w/o a Token.

h tps://eplayer.click/loadbalancing.php?id=/cdn/premium31/tracks-v1a1/2021/12/28/11/21/38-05000.ts
h tps://loadbalanceed.ml//cdn/premium31/tracks-v1a1/2021/12/28/11/21/38-05000.js?hour=ts

Is there a way to Code this? If not possible, is it because of the Load Balancer? Thanks, m5

Oh, you may notice in m5 there a (two) referers - meaning switch <referer> to <info> per Fiddler - but - widevine seems to load quicker.
LSP3 XML:
<item>
<title>FOX News | daddylive.click</title>
<fanart>https://ohcbrands.com/wp-content/uploads/2018/05/black-background.jpg</fanart>
<thumbnail>https://i.imgur.com/8EL6mr3.png</thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Referer=https://widevine.licenses4.me/</link>
<regex>
<name>m5</name>
<expres>Clappr.Player[\w\W]*?.source:['"]([^'"]+)</expres>
<page>$doregex[m4]</page>
<info>https://rkc.primetubsub.xyz/</info>
<referer>https://widevine.licenses4.me/</referer>
</regex>
<regex>
<name>m4</name>
<expres>iframe\s*src="([^"]+)</expres>
<page>$doregex[m3]</page>
<referer>https://daddylive.click/</referer>
</regex>
<regex>
<name>m3</name>
<expres>iframe\s*src="([^"]+)</expres>
<page>https://daddylive.click/stream/stream-347.php</page>
<referer>https://daddylive.click/</referer>
</regex>
</item>
 
  • Like
Reactions: captainhardlock

m5Germany

Active member
Mar 20, 2014
352
115
43
Additional Info:

Fiddler shows Cloudflare. Is this the reason I get a 403 Fobidden Error while trying access widevine which then does not get proper auth?

GET h tps://widevine.licenses4.me/reclama/mdl.p2p.php?id=&test=true HTTP/1.1
Host: widevine.licenses4.me
Connection: keep-alive
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
Upgrade-Insecure-Requests: 1
DNT: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: navigate
Sec-Fetch-Dest: iframe
Referer: h tps://videocdn.click/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9

HTTP/1.1 403 Forbidden
Truncated
<head>
<title>Access denied | widevine.licenses4.me used Cloudflare to restrict access</title>
Truncated
</head>
<body>
<div id="cf-wrapper">
<div class="cf-alert cf-alert-error cf-cookie-error hidden" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
<div id="cf-error-details" class="p-0">
<header class="****">
<h1 class="****">
<span data-translate="error">Error</span>
<span>1020</span>
</h1>
<span class="inline-block md:block heading-ray-id font-mono text-15 lg:text-sm lg:leading-relaxed">Ray ID: 6c564c548ef909e6 &bull;</span>
<span class="inline-block md:block heading-ray-id font-mono text-15 lg:text-sm lg:leading-relaxed">2021-12-29 **:59:54 UTC</span>
<h2 class="text-gray-600 leading-1.3 text-3xl lg:text-2xl font-light">Access denied</h2>
</header>
<section class="****">
<div id="what-happened-section" class="w-1/2 md:w-full">
<h2 class="text-3xl leading-tight font-normal mb-4 text-black-dark antialiased" data-translate="what_happened">What happened?</h2>
<p>This website is using a security service to protect itself from online attacks.</p>
</div>
 
  • Like
Reactions: captainhardlock

m5Germany

Active member
Mar 20, 2014
352
115
43
WOW. This is wierd. Code now works as it should for me also. Anyway, I wrote a makelist also - use it if you want.
The only thing I can think of is that Fiddler - even though closed - was still making Windows 10 use it's proxy.
Site did change a lot over the pass few day's, maybe things have settled down.
LSP3 XML:
<item>
<title>Main Menu 24/7 Live Channels | daddylive.click</title>
<fanart>https://ohcbrands.com/wp-content/uploads/2018/05/black-background.jpg</fanart>
<thumbnail>https://i.imgur.com/8EL6mr3.png</thumbnail>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param2]</title>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Referer=https://widevine.licenses4.me/</link>
<fanart>https://ohcbrands.com/wp-content/uploads/2018/05/black-background.jpg</fanart>
<thumbnail>https://i.imgur.com/8EL6mr3.png</thumbnail>
]]></listrepeat>
<expres><![CDATA[grid-item"><a href="([^"]+).*?strong>([^<]+)]]></expres>
<page>https://daddylive.click/24-hours-channels.php</page>
<referer>https://daddylive.click/</referer>
</regex>
<regex>
<name>m5</name>
<expres>Clappr.Player[\w\W]*?.source:['"]([^'"]+)</expres>
<page>$doregex[m4]</page>
<info>https://rkc.primetubsub.xyz/</info>
<referer>https://widevine.licenses4.me/</referer>
</regex>
<regex>
<name>m4</name>
<expres>iframe\s*src="([^"]+)</expres>
<page>$doregex[m3]</page>
<referer>https://daddylive.click/</referer>
</regex>
<regex>
<name>m3</name>
<expres>iframe\s*src="([^"]+)</expres>
<page>https://daddylive.click[makelist.param1]</page>
<referer>https://daddylive.click/</referer>
</regex>
</item>
 

m5Germany

Active member
Mar 20, 2014
352
115
43
LSP3 XML:
<item>
<title>Main Menu 24/7 Live Channels | daddylive.click</title>
<fanart>https://ohcbrands.com/wp-content/uploads/2018/05/black-background.jpg</fanart>
<thumbnail>https://i.imgur.com/8EL6mr3.png</thumbnail>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param2]</title>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Referer=https://www.funks.ws/</link>
<fanart>https://ohcbrands.com/wp-content/uploads/2018/05/black-background.jpg</fanart>
<thumbnail>https://i.imgur.com/8EL6mr3.png</thumbnail>
]]></listrepeat>
<expres><![CDATA[grid-item"><a href="([^"]+).*?strong>([^<]+)]]></expres>
<page>https://daddylive.click/24-hours-channels.php</page>
<referer>https://daddylive.click/</referer>
</regex>
<regex>
<name>m5</name>
<expres>Clappr.Player[\w\W]*?.source:\s*['"]([^'"]+)</expres>
<page>$doregex[m4]</page>
<referer>https://daddylive.click/</referer>
</regex>
<regex>
<name>m4</name>
<expres>iframe\s*src="([^"]+)</expres>
<page>https://daddylive.click[makelist.param1]</page>
<referer>https://daddylive.click/</referer>
</regex>
</item>
 

tpoupi

Member
Jan 2, 2016
41
0
6
Could somebody please help to make Regex. THk

hxxps://africa24tv.com/africa-24-live/
 

streamwatcher2013

Well-known member
Oct 24, 2013
993
450
63
USA
Seem like static links.

LSP XML:
<item>
<title>Africa 24TV</title>
<link>https://edge15.vedge.infomaniak.com/livecast/ik:africa24/manifest.m3u8|user-agent=ipad</link>
<link>rtsp://africa24.vedge.infomaniak.com/livecast/africa24</link>
<link>https://africa24.vedge.infomaniak.com/livecast/ik:africa24/playlist.m3u8|user-agent=ipad</link>
</item>
 
  • Like
Reactions: tpoupi

streamwatcher2013

Well-known member
Oct 24, 2013
993
450
63
USA
Here is the regex code:

LSP XML:
<item>
<title>Africa 24TV</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  url=re.findall('loading="lazy".+?src="([^"]+)',page_data)[0]
  strurl=url.replace('?channel','/playerConfig.php?channel')
  source=requests.get(strurl,headers={'user-agent':'Mozilla/5.0','referer':url,'accept':'*/*'}).text.replace('\\','')
  return re.findall('"hls","url":"([^"]+)',source)[0]+'|user-agent=ipad&referer='+url
#  return re.findall('"android","url":"([^"]+)',source)[0]                                                 #  for Anfroid
#  return re.findall('"ios","url":"([^"]+)',source)[0]+'|user-agent=ipad&referer='+url   # for iOS Apple
]]></expres>
<page>https://africa24tv.com/africa-24-live/</page>
</regex>
</item>
 
  • Like
Reactions: tpoupi

arslion84

New member
Dec 31, 2015
10
0
1
Hi all,
someone can help me with this

XML:
<item>

<title>youtube search_query </title>

<link>$doregex[makelist]</link>

 

<regex>

<name>makelist</name>

<listrepeat><![CDATA[

<title>[makelist.param2]    [makelist.param3]  </title>

<link>plugin://plugin.video.youtube/play/?video_id=[makelist.param1]</link>

]]></listrepeat>

<expres>href="\/watch\?v=(.*?)".*?dir="ltr">(.*?)&lt;\/a.*?> -(.*?)&lt;</expres>

<page>https://www.youtube.com/results?search_query=tek+part+diziler+son+bolum</page>    <!-- More pages ?  CHANGE THIS ADRESS !! and nothing else  -->

</regex>

</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
993
450
63
USA
Try this. You can use other option utube or urlsolve beside the plugin.video.youtube:

LSP XML:
<item>
<title>youtube search_query </title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2] ([makelist.param3]) </title>
  <link>plugin://plugin.video.youtube/play/?video_id=[makelist.param1]</link>
  <!--<utube>[makelist.param1]</utube>-->
  <!--<urlsolve>https://www.youtube.com/watch?v=[makelist.param1]</urlsolve>-->
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  surl='https://www.youtube.com/results?search_query=tek+part+diziler+son+bolum'
  source=requests.get(surl,headers={'user-agent':'Mozilla/5.0','referer':'https://ustvgo.tv/','accept':'*/*'}).text
  return re.findall('{"videoRenderer":{"videoId":"([^"]+).+?"title":{"runs":.{"text":"([^"]+).+?"simpleText":"(\d:\d+:\d+[^"]+)',source)
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: arslion84

Imanian2

New member
Apr 24, 2014
5
0
1
I am working on this but not success yet.
can somebody help me please.
this is code

Code:
<?php

#$id = @$_GET['id'];
#$url = 'https://sepehr.irib.ir/?idc=129&idt=tv&idv='.$id;
$url = 'https://sepehrapi.irib.ir/v3/channels/?list=42&include_media_resources=true&include_details=true'
$stream = irib($url);
#preg_match_all('(https.*m3u8.*")', $stream, $match, PREG_PATTERN_ORDER);
#$stream = $match[0][0];
#$stream = explode('" type=', $stream);
#$stream = $stream[0];
#header("location: " . $stream);

print_r ($stream);



function irib($url){
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');

$headers = array();
$headers[] = 'Host: sepehrapi.irib.ir';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0';
$headers[] = 'Accept: */*';
$headers[] = 'Accept-Language: fi,en-US;q=0.9,en;q=0.8';
$headers[] = 'Accept-Encoding: gzip, deflate, br';
$headers[] = 'Access-Control-Request-Headers: authorization';
$headers[] = 'Access-Control-Request-Method: GET';
$headers[] = 'Origin: https://sepehr.irib.ir';
$headers[] = 'Sec-Fetch-Des: empty';
$headers[] = 'Sec-Fetch-Mode: cors';
$headers[] = 'Sec-Fetch-Site: same-site';
$headers[] = 'Authorization: OAuth oauth_consumer_key="84ALFkdjpBX0DSR3DsaLo364lKs1hTGq", oauth_nonce="s2SCHVJ5ovQZ25YkAEjHACW4k15OEzb6", oauth_signature="OGUzYWY4NGE2ZTE2YzRmOTJjMmY3YTA0MTFmZjc3ODUzNjIwMTJhZg%3D%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1641132794", oauth_token="b49255684ad9347386d890a04a642bfa7052d69ca568938b622ca7d84ed93972", oauth_version="1.0"';
$headers[] = 'Referer: https://sepehr.irib.ir/';
$headers[] = 'Connection: keep-alive';
$headers[] = 'Pragma: no-cache';
$headers[] = 'Cache-Control: no-cache';



curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
return $result; 
}
 
Thread starter Similar threads Forum Replies Date
I Scraper Development 1
G Scraper Development 0
O Addon Requests 5