LSP Regex & Makelist Discussion.

tungbeng95

Member
Oct 25, 2018
381
12
18
I need fix this code.Tks
Code:
<item>
  <title>M3</title>
  <inputstream>$doregex[getUrl]|user-agent=ipad</inputstream>
  <regex>
  <name>getUrl</name>
  <expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re
  strurl = re.findall(r'nava_widevine_playready":"([^"]+)', page_data)[0]
  return strurl.replace('\\','')
]]></expres>
  <page>https://archivum.mtva.hu/m3/embed</page>
  </regex>
  <regex>
    <name>auth</name>
    <expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, urllib
  token = re.findall(r'auth_xml":"([^"]+)', page_data)[0]
  return urllib.quote_plus(urllib.quote_plus(token))
]]></expres>
    <page>https://archivum.mtva.hu/m3/embed</page>
  </regex>
</item>
Source: https://archivum.mtva.hu/m3/embed
 

undpnd tqucbo

Member
Jan 25, 2021
74
0
6
Can I get help 2 sites & tk!
Code:
https://www.fox.com.tr/canli-yayin
&
Code:
http://www.eurostartv.com.tr/canli-izle
 

m5Germany

Active member
Mar 20, 2014
224
69
28
LSP3 XML:
<item>
<title>https://www.fox.com.tr/canli-yayin</title>
<fanart>https://tejedd76pluu.merlincdn.net//images/playerDefaulPoster.jpg</fanart>
<thumbnail>https://seriesturkish.com/uploads/2021/05/fox-canli-yayin-youtube-thumbnail-642x320.jpg</thumbnail>
<link>$doregex[m5]|User-Agent=iPad&amp;Origin=https://www.fox.com.tr&amp;Referer=https://www.fox.com.tr/</link>
<regex>
<name>m5</name>
<expres>videoSrc.*?'\s*:\s*'(h[^']+)</expres>
<page>https://www.fox.com.tr/canli-yayin</page>
<referer>https://www.fox.com.tr/</referer>
</regex>
</item>


<item>
<title>http://www.eurostartv.com.tr/canli-izle</title>
<fanart>https://assets.materialup.com/uploads/b4bf6e0d-d77f-406b-89ca-5c10388e1783/teaser.png</fanart>
<thumbnail>http://eurostartv.com.tr/Content/img/logo.png</thumbnail>
<link>$doregex[m5]|User-Agent=iPad&amp;Origin=http://www.eurostartv.com.tr&amp;Referer=http://www.eurostartv.com.tr/</link>
<regex>
<name>m5</name>
<expres>liveUrl\s*=\s*'([^']+)</expres>
<page>http://www.eurostartv.com.tr/canli-izle</page>
<referer>http://www.eurostartv.com.tr/</referer>
<includeheaders />
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

PinkWave

New member
Jan 24, 2021
24
2
3
Hi.

Can I get help for these 2 sites?

Code:
https://v7.sportzonline.to/channels/hd/hd2.php
Code:
https://wigilive.com/embed.php?id=live15
 

posadka

New member
Jun 10, 2021
4
4
3
<item>
<title>Wigi</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,url = ''):
import re,requests jsunpack
r1 = re.findall('(?s)<iframe src=\'([^\']*)',page_data)[0]
s = 'https:' + r1
u2 = requests.get(s, headers={'user-agent':'iPad','referer':s}).text
find = re.findall('eval\(function(.+?.+)', u2)[0]
unpack = jsunpack.unpack(find)
result = re.findall('var src="([^"]*)', unpack)[0]
return result + '|user-agent=iPad&amp;referer=' + s
]]></expres>
<page>https://wigilive.com/embed.php?id=live15</page>
</regex>
</item>

<item>
<title>https://v7.sportzonline.to/channels/hd/hd2.php</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,url = 'https://v7.sportzonline.to/channels/hd/hd2.php'):
import re,requests jsunpack
src = re.findall('<iframe src="([^"]*)', page_data)[0]
src = 'http:' + src if src.startswith('//') else src
fu = requests.get(src, headers={'user-agent':'iPad','referer':src}).text
find = re.findall('eval\(function(.+?.+)', fu)[0]
unpack = jsunpack.unpack(find)
c = re.findall('var src="([^"]*)',unpack)[0]
return c + '|user-agent=ipad&referer=' + src
]]></expres>
<page>https://v7.sportzonline.to/channels/hd/hd2.php</page>
</regex>
</item>
 
  • Like
Reactions: PinkWave

m5Germany

Active member
Mar 20, 2014
224
69
28
Neither of the Codes work. Then again the Code Tag isn't used, even-though it is implicit.
Here's what I have for "live15".
Please - can we have some decorum? Reluctantly, m5
LSP3 XML:
<item>
<title>Tennis Channel</title>
<fanart>https://variety.com/wp-content/uploads/2013/07/tennis-channel-logo.jpg?w=622</fanart>
<thumbnail>https://hugetv.org/wp-content/uploads/2016/04/tennis_channel.png</thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Accept=*/*&amp;Origin=https://wigistream.to&amp;Referer=https://wigistream.to/</link>
<regex>
<name>m5</name>
<expres>var\s*src\s*=\s*"([^"]+)</expres>
<page>$doregex[m4]</page>
<agent>Mozilla/5.0</agent>
<accept>*/*</accept>
<referer>https://wigilive.com/</referer>
</regex>
<regex>
<name>m4</name>
<expres>$pyFunction:get_unpacked(page_data,'(eval.*m3u8.*)')</expres>
<page>https:$doregex[m3]</page>
<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://wigilive.com/</referer>
</regex>
<regex>
<name>m3</name>
<expres>iframe\s*src='([^']+)</expres>
<page>https://wigilive.com/embed.php?id=live15</page>
<agent>Mozilla/5.0</agent>
<accept>image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8</accept>
<referer>https://wigilive.com/embed.php?id=live15</referer>
</regex>
</item>
I will only post a solution that has been Tested - multiple times and using 18.5 - 19 and LSP~3.0.0 alpha4 - That's why I do not post and image.
If I am wrong - Please advise.
 
  • Like
Reactions: Doom

m5Germany

Active member
Mar 20, 2014
224
69
28
@Doom, Generally when I ask for help I ask the Forum as a whole and not an individual. It's nothing personal - but - If I ask an individual it puts pressure on that person to answer and IMHO you might be better served by a more experienced Coder with a better solution. I looked at doing that and it does not seem to be to difficult. I "basically" only write RegEx - but - I do like the way Python Looks. Plus Python can do more than RegEx.
So, If there is a Python writer who would like to Code a makelist - go for it. If after a couple of day's it is not written - I'll do what I can, No promises.
Respectfully, m5
 
  • Like
Reactions: Doom

streamwatcher2013

Well-known member
Oct 24, 2013
931
412
63
USA
Try this:

LSP XML:
<item>
<title>https://wigilive.com/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2][/COLOR]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,datetime
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  list=re.findall('class="text-center\s*tit">(?s)(.*?)class="text-center\s*tit">',page_data)[0]
  return re.findall('(?s)id=.heading.+?background-image:\s*url\(([^\)]+).+?<b>([^<]+)(?s)(.*?)</table',list)
]]></expres>
<page>https://wigilive.com/</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[makelist2.param3] [COLOR gold][makelist2.param4] [COLOR dodgerblue]([makelist2.param1])[/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,time
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  gtitle=re.findall('<tr\s*class="([^"]+)',page_data)
  for d in gtitle:
    title=d.upper()
    page_data=page_data.replace(d,title)
  return re.findall('<tr\s*class="(.+?)"><td>.+?href="([^"]+).+?(\d+:\d+)\s*([^<]+)',page_data)
]]></expres>
<page>[makelist.param3]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  url='https://wigilive.com[makelist2.param2]'
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'https://wigilive.com/','accept':'*/*'}).text
  link='https://'+re.findall('<iframe\s*src.+?//([^[\'"]+)',source)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://wigilive.com/','accept':'*/*'}).text
  msource=jsunpack.unpack(re.findall('(eval.*m3u8.*)',source)[0])
  return re.findall('(?s)hlsjsConfig."loader".+?src.+?[\'"]([^\'"]+)',msource)[0]+'|user-agent=ipad&origin=https://wigilive.com&referer=https://wigilive.com/'
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: Doom

m5Germany

Active member
Mar 20, 2014
224
69
28
Tried a couple of different things with this. Also used .upper() and <tr\s*class="(.+?)"><td>.+?href="([^"]+).+?(\d+:\d+)\s*([^<]+) from streamwatcher13's Code. Mine was small"\s*href="([^"]+)|<b>\s*(\d+:\d+[^<]+) and did not capture the country - ie: usa etc. Would be nice if there was a way to convert the time to users local machine time.
I had already started working on this before streamwatcher13 published his Code so I thought I would share it.
LSP3 XML:
<item>
  <title>[COLOR=FF00FFFF]Live Events [/COLOR][COLOR=red]|[/COLOR][COLOR=FF00CCFF] wigilive.com[/COLOR]</title>
  <fanart>https://wallpaperaccess.com/full/1397755.jpg</fanart>
  <thumbnail>https://gaisf.sport/wp-content/uploads/all-sports.png</thumbnail>
  <link>$doregex[makelist]</link>
  <regex>
    <name>makelist</name>
    <listrepeat><![CDATA[<title>[COLOR=orange][makelist.param1][/COLOR][COLOR=yellow][makelist.param2][/COLOR][COLOR=skyblue][makelist.param5] [makelist.param6] $doregex[m2][/COLOR]</title>
<fanart>https://wallpaperaccess.com/full/1397755.jpg</fanart>
<thumbnail>https://img.pngio.com/nostragamus-pro-png-of-sports-456_288.png</thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Accept=*/*&amp;Origin=https://wigistream.to&amp;Referer=https://wigistream.to/</link>]]></listrepeat>
    <expres><![CDATA[tit">([^<]+)|\s*<b>([^<]+)</b>\s|<tr\s*class="(.+?)"><td>.+?href="([^"]+).+?(\d+:\d+)\s*([^<]+)]]></expres>
    <page>https://wigilive.com/</page>
  </regex>
  <regex>
    <name>m5</name>
    <expres>var\s*src\s*=\s*"([^"]+)</expres>
    <page>$doregex[m4]</page>
    <agent>Mozilla/5.0</agent>
    <accept>*/*</accept>
    <referer>https://wigilive.com/</referer>
  </regex>
  <regex>
    <name>m4</name>
    <expres>$pyFunction:get_unpacked(page_data,'(eval.*m3u8.*)')</expres>
    <page>https:$doregex[m3]</page>
    <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://wigilive.com/</referer>
  </regex>
  <regex>
    <name>m3</name>
    <expres>iframe\s*src='([^']+)</expres>
    <page>https://wigilive.com[makelist.param4]</page>
    <agent>Mozilla/5.0</agent>
    <accept>image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8</accept>
    <referer>https://wigilive.com/</referer>
  </regex>
  <regex>
    <name>m2</name>
    <expres>$pyFunction:'[makelist.param3]'.upper()</expres>
    <page />
  </regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
412
63
USA
@m5Germany Here is the update version for new domain and local time

LSP XML:
<item>
<title>https://starlive.xyz - with local time</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2][/COLOR]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,datetime
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  list=re.findall('class="text-center\s*tit">(?s)(.*?)class="text-center\s*tit">',page_data)[0]
  return re.findall('(?s)id=.heading.+?background-image:\s*url\(([^\)]+).+?<b>([^<]+)(?s)(.*?)</table',list)
]]></expres>
<page>https://starlive.xyz/</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[makelist2.param3] [COLOR gold][makelist2.param4] [COLOR dodgerblue]([makelist2.param1])[/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,time
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  gtime=re.findall('(\d+:\d+)',page_data)
  for t in gtime:
    localtime=int(t[:-3]) -6  #  Subtract 6 from GMT +1. My is Eastern Time Zone
    if localtime > 24:
      localtime -=24
    if localtime < 1:
      localtime +=24
    lctime=str(localtime)+t[2:]
    lctime=lctime.zfill(5)
    page_data=page_data.replace(t,lctime)
  gtitle=re.findall('<tr\s*class="([^"]+)',page_data)
  for d in gtitle:
    title=d.upper()
    page_data=page_data.replace(d,title)
  return re.findall('<tr\s*class="(.+?)"><td>.+?href="([^"]+).+?(\d+:\d+)\s*([^<]+)',page_data)
]]></expres>
<page>[makelist.param3]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  url='https://starlive.xyz[makelist2.param2]'
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'https://starlive.xyz/','accept':'*/*'}).text
  link='https://'+re.findall('<iframe\s*src.+?//([^[\'"]+)',source)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://starlive.xyz/','accept':'*/*'}).text
  msource=jsunpack.unpack(re.findall('(eval.*m3u8.*)',source)[0])
  return re.findall('(?s)hlsjsConfig."loader".+?src.+?[\'"]([^\'"]+)',msource)[0]+'|user-agent=ipad&origin=https://starlive.xyz&referer=https://starlive.xyz/'
]]></expres>
<page></page>
</regex>
</item>
 

AGAMEN0N

New member
Jul 4, 2019
15
2
3
Hi!

Can you help me with this site?

Code:
https://serieskao.tv/series/the-walking-dead-123/
I need to create a list of chapters from the fembed source

Thank you!
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
412
63
USA
Try this:

LSP XML:
<item>
<title>The Walking Dead</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param3]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param2]</thumbnail>
  <fanart>http://www.baltana.com/files/wallpapers-13/The-Walking-Dead-HQ-Background-Wallpaper-35735.jpg</fanart>
]]></listrepeat>
<expres><![CDATA[mark-\d+.><a href=[\'"]([^|'"]+).+?src=[\'"]+([^\'"]+).+?epst.>([^<]+)]]></expres>
<page>https://serieskao.tv/series/the-walking-dead-123/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,json
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('"pframe".+?src="([^"]+)',page_data)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://serieskao.tv/','accept':'*/*'}).text
  list=re.findall('"OptionsLangDisp">(?s)(.*?)<script',source)[0]
  gurl='https://animekao.club/player/?id='+re.findall('onclick=.go_to_player.[\'"]([^\'"]+).*\n.*?src.+?(?:F|f)embed',list)[0]
  source=requests.get(gurl,headers={'user-agent':'Mozilla/5.0','referer':link,'accept':'*/*'}).text
  rurl=re.findall('iframe\s*src=[\'"]([^\'"]+)',source)[0]
  apiurl=requests.get(rurl,headers={'user-agent':'Mozilla/5.0'},allow_redirects=False).headers['Location']
  url=apiurl.split('#');url=url[0]+'/'
  purl=url.replace('v/','api/source/');ref=re.findall('(http.+?)api/',purl)[0];getd=re.findall('https://([^/]+)',purl)[0]
  jdata=requests.post(purl,headers={'user-agent':'Mozilla/5.0','referer':ref,'x-requested-with':'XMLHttpRequest','accept':'*/*'},data={'r':'https://animekao.club/','d':getd}).text.replace('\\','')
  if '1080' in jdata:
     return re.findall('"file":"([^"]+).."label":"1080',jdata)[0]
  elif '720' in jdata:
     return re.findall('"file":"([^"]+).."label":"720',jdata)[0]
  else:
     return re.findall('"file":"([^"]+).."label":"480',jdata)[0]
]]></expres>
<page>[makelist.param1]</page>
</regex>
<thumbnail>https://media.comicbook.com/2017/10/twd8-1040266.png</thumbnail>
<fanart>http://www.baltana.com/files/wallpapers-13/The-Walking-Dead-HQ-Background-Wallpaper-35735.jpg</fanart>
</item>
 
  • Like
Reactions: AGAMEN0N

undpnd tqucbo

Member
Jan 25, 2021
74
0
6
Code:
http://service.startv.com.tr/json/mlive/androidphone
 

m5Germany

Active member
Mar 20, 2014
224
69
28
LSP3 XML:
<item>
<title>Star TV Turkey</title>
<fanart>https://www.sondakikaturk.com.tr/images/album/1923351_0_1543582057fOcwT.jpg</fanart>
<thumbnail>https://assets.startv.com.tr/assets/images/logo/apple-touch-icon-144x144.png</thumbnail>
<link>$doregex[m5]|User-Agent=iPad&amp;Accept=*/*&amp;Origin=https://www.startv.com.tr&amp;Referer=https://www.startv.com.tr/</link>
<regex>
<name>m5</name>
<expres>Url":"([^"]+)</expres>
<page>http://service.startv.com.tr/json/mlive/androidphone</page>
<referer>https://www.startv.com.tr</referer>
<includeheaders />
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

Doom

Member
Sep 16, 2019
289
21
18
Could i please get a fix here & thanks!
LSP XML:
<item>
<title>MMA</title>
<thumbnail></thumbnail>
<fanart></fanart>
<link>$doregex[makelist]</link> 
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR blue]([makelist.param3])[/COLOR][COLOR gold] [makelist.param2][/COLOR]</title> 
<thumbnail></thumbnail>
<fanart></fanart>
<link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[a href='([^']+)[\w\W]*?g'>\s*([^<]+).*\n.*?-\s([^<]+)]]></expres>
<page>http://is.crackstreams.ac/mmastreams/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
link='[makelist.param1]';ref=link[:-13]
if 'crackstreams' in link:
url='%svideo.php'%link
source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'}).text
if 'window.atob' in source:
decode=re.findall('window.atob.[\'"]([^\'"]+)',source)[0]
return base64.b64decode(decode).decode('utf-8')+'|user-agent=ipad&origin=http://is.crackstreams.ac/&referer=http://is.crackstreams.ac//'
else:
return re.findall('id="play[\w\W]+?(?:source|src|file):\s*[\'"](htt[^\'"]+)',psource)[0]+'|user-agent=ipad&origin=http://is.crackstreams.ac/&referer=http://is.crackstreams.ac/'
else:
url=re.findall('<iframe.+?src=[\'"](.+?crackstreams[^\'"]+)',page_data)[0]
source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'}).text
if 'window.atob' in source:
decode=re.findall('window.atob.[\'"]([^\'"]+)',source)[0]
return base64.b64decode(decode).decode('utf-8')+'|user-agent=ipad&origin=http://is.crackstreams.ac/&referer=http://is.crackstreams.ac/'
else:
return re.findall('id="play[\w\W]+?(?:source|src|file):\s*[\'"](htt[^\'"]+)',psource)[0]+'|user-agent=ipad&origin=http://is.crackstreams.ac/&referer=http://is.crackstreams.ac/'
]]></expres>
<page>[makelist.param1]</page>
<referer>http://is.crackstreams.ac/</referer>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
412
63
USA
Try this:

LSP XML:
<item>
<title>NBA EVENTS</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR blue]([makelist.param3])[/COLOR][COLOR gold] [makelist.param2][/COLOR]</title>
  <fanart></fanart>
  <thumbnail></thumbnail>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[a\s*href='([^']+)[\w\W]*?g'>\s*([^<]+).*\n.*?-\s([^<]+)]]></expres>
<page>http://is.crackstreams.ac/nbastreams/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link='http://is.crackstreams.ac[makelist.param1]';ref='http://is.crackstreams.ac/nbastreams/'
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'}).text
  if 'crackstreams' in link:
    url=re.findall('id="ipopp"\s*src="([^"]+)',source)[0]
    source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'http://is.crackstreams.ac/','accept':'*/*'}).text
    if 'window.atob' in source:
      decode=re.findall('window.atob.[\'"]([^\'"]+)',source)[0]
      return base64.b64decode(decode).decode('utf-8')+'|user-agent=ipad&origin=http://is.crackstreams.ac&referer=http://is.crackstreams.ac/'
    else:
      eurl=re.findall('<iframe.+?src=[\'"]([^\'"]+)',source)[0];ori=re.findall('(htt.+?)/nba',eurl)[0]
      source=requests.get(eurl,headers={'user-agent':'Mozilla/5.0','referer':'http://nbastreams.site/','accept':'*/*'}).text
      return re.findall('id="play[\w\W]+?(?:source|src|file):\s*[\'"](htt[^\'"]+)',source)[0]+'|user-agent=ipad&origin=%s&referer=%s'%(ori,ori+'/')
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: Doom

undpnd tqucbo

Member
Jan 25, 2021
74
0
6
Can I get help this site & tk!
Code:
https://www.sporizle1.pw/embed/sinematv-29-izle?web
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
412
63
USA
Try this:

LSP XML:
<item>
<title>Sinema</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  dID=re.findall('data-i="',page_data)[0]
  source=requests.get('https://www.sporizle1.pw/cdn/js/ads.php?%s'%dID,headers={'user-agent':'Mozilla/5.0','referer':'https://www.sporizle1.pw/embed/sinematv-29-izle','accept':'*/*'}).text
  sID=re.findall('sec:[\'"]([^\'"]+)',source)[0];data={'e':'1','sec':sID,'id':'11363'}
  bdata=requests.post('https://www.sporizle1.pw/embed/sinematv-29-izle',headers={'user-agent':'Mozilla/5.0','origin':'https://www.sporizle1.pw','referer':'https://www.sporizle1.pw/embed/sinematv-29-izle','x-requested-with':'XMLHttpRequest','accept':'*/*'},data=data).text[::-1]
  return base64.b64decode(bdata).decode('utf8')+'|user-agent=ipad&origin=https://www.sporizle1.pw&referer=https://www.sporizle1.pw/'
]]></expres>
<page>https://www.sporizle1.pw/embed/sinematv-29-izle</page>
</regex>
<thumbnail>https://tr.web.img3.acsta.net/medias/nmedia/18/95/53/45/20412938.jpg</thumbnail>
</item>
 
  • Like
Reactions: undpnd tqucbo

thingy

Member
May 9, 2018
60
1
6
is it possible you can help me with a regex for this channel?
Code:
hxxps://www.supertelevisionhd.net/home-and-health-en-vivo/
 

m5Germany

Active member
Mar 20, 2014
224
69
28
<item>
<title>Request for help - Thanks, m5</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[Python]|user-agent=ipad&amp;accept=*/*&amp;origin=https:&amp;referer=https:</link>

m4 returns gmmvwaor3p4u3mt5iyldhzo9ibkn2l3bnlxugb6lmcvb3cuc3d39yl6mhc0rha

Can a RegEx be written for base64.b64decode($doregex[m4])[::-1].decode('utf-8') and reverse the string?
Or does it need a Python Block? If both or either is possible - would someone be so kind as to help and write both/either so I can get it right?
Would be Great if both were possible. I did try but no success.

<regex>
<name>m4</name>
<expres>(.*)</expres>
<page>https:</page>
<referer>https:</referer>
<rawpost><![CDATA[abcdefg]]></rawpost>
<origin>https:</origin>
<x-req>XMLHttpRequest</x-req>
<cookieJar></cookieJar>
</regex>
</item>
 

gujal

Developer
Dec 26, 2013
536
295
63
Provide a working url so that it can be looked at. the m4 return value is not just base64 decoding the reverse string as padding chars needed to be added and the decoded string seems to be encrypted as well
Code:
>>> m4 = "==gmmvwaor3p4u3mt5iyldhzo9ibkn2l3bnlxugb6lmcvb3cuc3d39yl6mhc0rha"
>>> base64.b64decode(m4[::-1])
b'j\x1a\xf4r\x19\xba\x97/www.sv\xefrizn\x0b\xb1\x96v\xf7\x97i\xe4n/h\xce\x17e\xca.m\x9b{\xb8\xa7z\xe8k\x0b\xe6\x9a'
 
  • Like
Reactions: m5Germany

gujal

Developer
Dec 26, 2013
536
295
63
Enjoy!

LSP XML:
<item>
  <title>moviesmart HD</title>
  <fanart></fanart>
  <thumbnail></thumbnail>
  <link>$doregex[m5]|user-agent=ipad&amp;origin=https://www.sporizle1.pw</link>
  <regex>
    <name>m5</name>
    <expres>$pyFunction:base64.b64decode('$doregex[m4]'[::-1]).decode('utf-8')</expres>
    <page></page>
  </regex>
  <regex>
    <name>m4</name>
    <expres>(.*)</expres>
    <rawpost>e=1&amp;sec=$doregex[m3]&amp;id=$doregex[m2]</rawpost>
    <page>https://www.sporizle1.pw/embed/sinematv-29-izle</page>
    <ignorecache/>
    <referer>https://www.sporizle1.pw/</referer>
    <x-req>XMLHttpRequest</x-req>
  </regex>
  <regex>
    <name>m3</name>
    <expres>sec:"([^"]+)</expres>
    <page>https://www.sporizle1.pw/cdn/js/ads.php?$doregex[m2]&amp;undefined</page>
  </regex>
  <regex>
    <name>m2</name>
    <expres>data-i="([^"]+)</expres>
    <page>https://www.sporizle1.pw/embed/sinematv-29-izle</page>
  </regex>
</item>
 
  • Like
Reactions: m5Germany

m5Germany

Active member
Mar 20, 2014
224
69
28
Info:
Thanks as always. Now I know I may not be using the correct terminology (layman) but here's what I've learned.

https://en.wikipedia.org/wiki/Base64 - This explains Padding and why you may/may not need to use.

44c138ab91d018a8f37ca3c94170f849 equals 32 characters divided by 8 = 32 which is a whole number - no Padding character(s) needed

44c138ab91d018a8f37ca3c94170f84  equals 31 characters divided by 8 = 3.875 which is NOT a whole number - 1 Padding character needed

This means you would have to add a padding character by 1 which would be: 44c138ab91d018a8f37ca3c94170f84=

So if I have it correct the below example has 2 padding characters

base64.b64decode('$doregex[m4]'[::-1]+'==').decode('utf-8')
 

gujal

Developer
Dec 26, 2013
536
295
63
Normally when you scrape base64 encoded strings are correctly padded.
Even in the code above it is correctly padded if the post had the correct values for id and sec.
Only when you do incorrect post was the site responding with an unpadded base64.
 
  • Like
Reactions: m5Germany

wasp

New member
Jun 15, 2021
2
0
1

posadka

New member
Jun 10, 2021
4
4
3
Code:
<item>
<title>Sportzonline</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param1] [makelist.param2]</title>
<link>$doregex[play]</link>
        <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,url = ''):
    import re
    e = re.findall('(?s)(\w+\:\w+)\s*([^|]*)\|(.*?php)', page_data)
    sort = [(i[0],i[1],i[2].replace(' ','')) for i in e]
    return sort
]]></expres>
<page>https://sportzonline.to/prog.txt</page>
</regex>
<regex>
<name>play</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,url = '[makelist.param3]'):
    from resources.lib.modules import jsunpack
    import re,requests
    src = re.findall('<iframe src="([^"]*)', page_data)[0]
    src = 'http:' + src if src.startswith('//') else src
    fu = requests.get(src, headers={'user-agent':'iPad','referer':url}).text
    find = re.findall('eval\(function(.+?m3u8.+)', fu)[0]
    unpack = jsunpack.unpack(find)
    play= re.findall('var\s*src="([^"]*)',unpack)[0]
    return play + '|user-agent=ipad&referer=' + url
]]></expres>
<page>[makelist.param3]</page>
</regex>
</item>
 
  • Like
Reactions: wasp

posadka

New member
Jun 10, 2021
4
4
3
Code:
<item>
<title>https://v7.sportzonline.to/channels/pt/sporttv1.php</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,url = 'https://v7.sportzonline.to/channels/pt/sporttv1.php'):
    from resources.lib.modules import jsunpack
    import re,requests
    src = re.findall('<iframe src="([^"]*)', page_data)[0]
    src = 'http:' + src if src.startswith('//') else src
    fu = requests.get(src, headers={'user-agent':'iPad','referer':url}).text
    find = re.findall('eval\(function(.+?m3u8.+)', fu)[0]
    unpack = jsunpack.unpack(find)
    play= re.findall('var\s*src="([^"]*)',unpack)[0]
    return play + '|user-agent=ipad&referer=' + url
]]></expres>
<page>https://v7.sportzonline.to/channels/pt/sporttv1.php</page>
</regex>
</item>
 
  • Like
Reactions: wasp

m5Germany

Active member
Mar 20, 2014
224
69
28
Info:
Looking to get Epoc Time for .json - https://teleriumtv.com/streams/46569/1623888540000.json
from https://embed-channel.stream//stream/uk_skysport_f1.php.

I would like to write the complete Code myself but cannot get the Epoc Time. The examples below
are from streamwatcher2013's prior Code. Thanks for that.
I did some reading on "How to get the epoch timestamp in Python" - to no avail. The http:// is
only used so I can see it in the Kodi Log.

When streamwatcher2013 wrote the Code I was getting a 403 Forbidden for the .json. I thought at
the time it was my security setup but have since run ipconfig/flushdns and now get a Code 200 - which is good.

The more I learn the less I have to bother you and the more members I can assist.

Thanks, m5

<item>
<title>Get Epoc Time Python</title>
<link>$doregex[EpocT]</link>
<regex>
<name>EpocT</name>
<expres><![CDATA[#$pyFunction
import time
def GetLSProData(page_data,Cookie_Jar,m)
  epoc=int((int(time.time()) + 86400) * 1000)
  return http://+'epoc'
]]></expres>
<page></page>
</regex>
</item>

<item>
<title>Get Epoc Time RegEx</title>
<link>$doregex[m5]</link>
<regex>
<name>m5</name>
<expres>$pyFunction:int((int(time.time()) + 86400) * 1000)</expres>
<page></page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
412
63
USA
I run this code under Kodi 19.x. You have to include the referer link with json link to avoid the code 403 error. And I prefer to use the code number 2 and 3

Epoch Time:
<item>
<title>Epoch Time with Kodi 19.x</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,time,datetime
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
#  now=int((time.time()) * 1000)   
     # 1/ Open failed with code 403 for https://teleriumtv.com/streams/46569/1623855038975.json

#  now=int((int(time.time()) + 86400) * 1000)
     # 2/ Open failed with code 403 for https://teleriumtv.com/streams/46569/1623941508000.json

  now=int(int(datetime.datetime.now().timestamp() + 86400) * 1000)
     # 3/ Open failed with code 403 for https://teleriumtv.com/streams/46569/1623942722000.json

#  now=round(datetime.datetime.utcnow().timestamp() * 1000)
     # 4/ Open failed with code 403 for https://teleriumtv.com/streams/46569/1623873883335.json

  return 'https://teleriumtv.com/streams/46569/%s.json'%now
]]></expres>
<page></page>
</regex>
</item>

Referer: https://teleriumtv.com/embed/46569.html
 
  • Like
Reactions: m5Germany

m5Germany

Active member
Mar 20, 2014
224
69
28
Albert Einstein's definition of insanity:
“The definition of insanity is doing the same thing over and over again and expecting different results.”
“Everyone is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.”

I am starting to believe I am a fish today. streamwatcher2013 thanks for the Code. Used the one below and verified it works. Thank you.
I also did my own version which also gives epoch time results. I've tried everything and or combination I know and I can't get it to work.

The only thing I see is Cookie: volume=0 and do not know how to scrape it. Time to admit defeat and move on. Thanks for you patients.
LSP3 XML:
<item>
<title>epochTime Python streamwatcher2013</title>
<link>http://$doregex[getEpoch]|User-Agent=Mozilla/5.0</link>
<regex>
<name>getEpoch</name>
<expres><![CDATA[#$pyFunction
import re,time,datetime
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  now=int((int(time.time()) + 86400) * 1000)
  return now
]]></expres>
<page></page>
</regex>
</item>

<item>
<title>epochTime RegEx m5</title>
<link>http://$doregex[m5]|User-Agent=Mozilla/5.0</link>
<regex>
<name>m5</name>
<expres>}.*\n_tD.([^\)]+)</expres>
<page>https://time.is/Unix</page>
<referer>https://time.is/</referer>
</regex>
</item>
 

undpnd tqucbo

Member
Jan 25, 2021
74
0
6
I need help the site & tk!
Code:
http://tv.bnt.bg/bnt4
 

m5Germany

Active member
Mar 20, 2014
224
69
28
LSP3 XML:
<item>
  <title>http://tv.bnt.bg/bnt4</title>
  <fanart>https://i2.offnews.bg/events/2018/09/10/687749/phpqog96z_559x345.jpg</fanart>
  <thumbnail>https://live-tv-channels.org/pt-data/uploads/logo/bg-bnt-world-4361.jpg</thumbnail>
  <link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Accept=*/*&amp;Origin=http://tv.bnt.bg&amp;Referer=http://tv.bnt.bg/</link>
  <regex>
    <name>m5</name>
    <expres>sdata.src\s*=\s*'([^']+)</expres>
    <page>http:$doregex[m4]|Upgrade-Insecure-Requests=1</page>
    <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>http://tv.bnt.bg/</referer>
  </regex>
  <regex>
    <name>m4</name>
    <expres>iframe.*?src="([^"]+)</expres>
    <page>http://tv.bnt.bg/bnt4|Upgrade-Insecure-Requests=1</page>
    <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>http://tv.bnt.bg/</referer>
  </regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

Doom

Member
Sep 16, 2019
289
21
18

Doom

Member
Sep 16, 2019
289
21
18

thingy

Member
May 9, 2018
60
1
6
*****need activation *****
Code:
<item>
<title>TELECLUB</title>
<link>$doregex[getc]</link>

<regex>
<name>getc</name>
<listrepeat><![CDATA[
<title>[COLOR skyblue]Lista[COLOR white] [getc.param1][/COLOR]</title>
<externallink>[getc.param2]</externallink>
<link>NA</link>
]]></listrepeat>
<expres><![CDATA[-(.*?)=(.*?)"]]></expres>
<page>-TV Latino=https://tv.teleclub.xyz/lista/latino.m3u"
-TV Latino 2=https://tv.teleclub.xyz/lista/latino2.m3u"
</page>
</regex>
<regex>
<name>code</name>
<expres><![CDATA[value="(http.*?)"]></expres>
<page>https://teleclub.xyz/listas/</page>
</regex>

<thumbnail></thumbnail>
<fanart></fanart>
</item>
 
  • Like
Reactions: Doom
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5