LSP Regex & Makelist Discussion.

Doom

Member
Sep 16, 2019
292
21
18
Could i get help here guys & thanks!
hxxps://www.televisiongratishd.com/izzi-afizzionados-en-vivo.html
 

gujal

Developer
Dec 26, 2013
539
296
63
Enjoy!

LSP XML:
<item>
<title>Afizzionados</title>
<link>$doregex[getUrl]|user-agent=iPad&amp;Referer=https://live.televisiongratishd.com/&amp;verifypeer=false</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, base64, jsunpack
  pdata = re.search('(eval\(function\(p,a,c,k,e.+?)</script', page_data, re.DOTALL)
  if pdata:
    page_data += jsunpack.unpack(pdata.group(1))
  burl = re.findall('MARIOCSCryptOld\("([^"]+)', page_data)[0]
  while 'm3u8' not in burl:
    burl = base64.b64decode(burl).decode('utf8')
  return burl
]]></expres>
<page>https://live.televisiongratishd.com/canales.php?id=30_</page>
<referer>https://www.televisiongratishd.com/</referer>
</regex>
</item>
 
  • Winner
Reactions: Doom

dantas1990

Member
Apr 10, 2020
55
1
8
Hi

How do I make it work on KODI 19? If you need to change anything in the code.

TKS.


<item>
<title></title>
<link>nada</link>
<externallink>$doregex[]</externallink>
<regex>
<name></name>
<expres><![CDATA[#$pyFunction

def GetLSProData(page_data,Cookie_Jar,m):

import xbmcgui

dialog = xbmcgui.Dialog()

ret = dialog.select('[])
lists = ['http://.xml','http://.xml','http://.xml',']

return lists[ret]

]]></expres>
<page></page>
</regex>
<thumbnail></thumbnail>
<fanart></fanart>
<info></info>
</item>



<item>
<title></title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR white] [makelist.param1][/COLOR]</title>
<link>$doregex[makelist]</link>
<thumbnail>NA</thumbnail>
]]></listrepeat>
<expres>#EXTINF:.*,(.*?)\n.*(http.*m3u8)</expres>
<page></page>
<x-forward></x-forward>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36</agent>
</regex>
<regex>
<name>encodedurl</name>
<expres>$pyFunction:urllib.quote_plus('[makelist.param2]')<expres>
<page></page>
<thumbnail></thumbnail>
<fanart></fanart>
<info></info>
</item>
 

gujal

Developer
Dec 26, 2013
539
296
63
use code blocks to post code, the above jibberish is too hard to read, You have been asked to use code blocks many a time, yet repeating the same

Anyway the answer is simple. there is no urllib.quote_plus in Python 3
It needs to be replaced with urllib.parse.quote_plus
 

dantas1990

Member
Apr 10, 2020
55
1
8
gujal

Hii


Do you know of that?
I couldn't do it with code that passed?
Don't know what's missing?

<item>
<title></title>
<link>nada</link>
<externallink>$doregex[]</externallink>
<regex>
<name></name>
<expres><![CDATA[#$pyFunction

def GetLSProData(page_data,Cookie_Jar,m):

import xbmcgui

dialog = xbmcgui.Dialog()

ret = dialog.select('[])
lists = ['http://.xml','http://.xml','http://.xml',']

return lists[ret]

]]></expres>
<page></page>
</regex>
<thumbnail></thumbnail>
<fanart></fanart>
<info></info>
</item>
 

gujal

Developer
Dec 26, 2013
539
296
63
Post proper code that works in Kodi 18 [in code block not jibberish]
What you have there is a skeleton template for an extrernal list, and that by itself will not work unless populated
 

undpnd tqucbo

Member
Jan 25, 2021
78
0
6
I need help to some sites & tk!
Code:
hxxps://adictosaldeporte.com/ver-fox-sports-mx-en-vivo-24h/
Code:
htxps://www.tv8.com.tr/canli-yayin
 

m5Germany

Active member
Mar 20, 2014
231
73
28
Here's tv8. adictosaldeporte is Telerium - I can't get it to work.
LSP3 XML:
<item>
<title>https://www.tv8.com.tr/canli-yayin</title>
<fanart>https://www.gursesgazetesi.com/images/haberler/2021/05/tv8-4-mayis-2021-sali-yayin-akisi-ve-tv-rehberi.jpg</fanart>
<thumbnail>https://mir-s3-cdn-cf.behance.net/projects/404/c52fd6106101471.5f8820a45d2f5.jpg</thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Referer=https://www.tv8.com.tr/</link>
<regex>
<name>m5</name>
<expres>hls",\s*file:\s*"([^"]+)</expres>
<page>https://www.tv8.com.tr/canli-yayin</page>
<referer>https://www.tv8.com.tr/</referer>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

streamwatcher2013

Well-known member
Oct 24, 2013
931
414
63
USA
fox sports 1 mx. Try it

LSP XML:
<item>
<title>FOX Sports 1 MX</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,time,urllib,urllib.parse
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  now=int((int(time.time()) + 86400) * 1000)
  jsurl='https://telerium.net/streams/74673/%s.json'%now
  r=requests.get(jsurl,headers={'user-agent':'Mozilla/5.0','referer':'https://teleriumtv.net/embed/74673.html','accept':'*/*'},cookies={'volume':'0'}).json()
  headers={'user-agent':'Mozilla/5.0','origin':'https://teleriumtv.net','referer':'https://teleriumtv.net/embed/74673.html'}
  netloc=r.get('url')
  if r.get('tokenurl'):
    netloc +=requests.get('https://teleriumtv.net'+r.get('tokenurl'),headers=headers).json()[10][::-1]
  netloc=netloc if netloc.startswith('http') else 'https:'+netloc
  return netloc+'|{0}'.format(urllib.urlencode(headers))              # Kodi 18.x
#  return netloc+'|{0}'.format(urllib.parse.urlencode(headers))   # Kodi 19.x
]]></expres>
<page>https://adictosalatele.com/TV/latinos/fox-sports1mx/</page>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

captainhardlock

New member
Jun 6, 2017
29
0
1
Please, help for this

Code:
hxxp://freestreams-live1.com/t-channel-1/
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
414
63
USA
Simple code:

LSP XML:
<item>
<title>Tennis</title>
<link>$doregex[getUrl]|user-agent=ipad</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[(?:P|player)[\w\W]*?(?:source|src|file)(?:\s*|):(?:\s*|)[\'"]([^\'"]+)]]></expres>
<page>http://showsport.xyz/iptv2/tennis1.php</page>
<referer>http://freestreams-live1.com/t-channel-1/</referer>
</regex>
</item>
 
  • Like
Reactions: captainhardlock

leobarros

New member
Jan 30, 2021
9
0
1
How to run m3u8 link on kodi 19 with Inputstream ffmpeg direct ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
 

undpnd tqucbo

Member
Jan 25, 2021
78
0
6
Can help me one more channels & tk!
Code:
hxxps://adictosaldeporte.com/ver-eurosport-1-online-y-en-directo-gratis-24h/
 

m5Germany

Active member
Mar 20, 2014
231
73
28
LSP3 XML:
<item>
<title>Eurosport 1 | adictosaldeporte.com</title>
<fanart>https://no-a.es/wp-content/uploads/2019/05/adicto-a-las-apuestas-deportivas.png</fanart>
<thumbnail>https://adictosaldeporte.com/logos/eurosport1.png</thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Referer=https://wigistream.to/</link>
<regex>
<name>m5</name>
<expres>source\s*:\s*"([^"]+)</expres>
<page>$doregex[m4]</page>
<referer>https://adictosaldeporte.com/</referer>
</regex>
<regex>
<name>m4</name>
<expres>iframe\s*src="([^"]+)</expres>
<page>https:$doregex[m3]</page>
<referer>https://adictosaldeporte.com/</referer>
</regex>
<regex>
<name>m3</name>
<expres>iframe.*?src="([^"]+)</expres>
<page>https://adictosaldeporte.com/ver-eurosport-1-online-y-en-directo-gratis-24h/</page>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

undpnd tqucbo

Member
Jan 25, 2021
78
0
6
Can someone help me this site & tk!
Code:
hxxps://www.mjunoon.tv/urdu-1-live
 

gujal

Developer
Dec 26, 2013
539
296
63
Enjoy!

LSP XML:
<item>
<title>Urdu-1</title>
<link>$doregex[getURL]|User-Agent=iPad</link>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import requests, binascii, json
  from Cryptodome.Cipher import AES
  from Cryptodome.Util.Padding import unpad
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0',
             'Referer': 'https://www.mjunoon.tv/'}
  aurl = 'https://cdn2.mjunoon.tv:9191/v2/auth/login'
  adata = {"email":"[email protected]","password":"webapi123789"}
  r = requests.post(aurl, json=adata, headers=headers).json()
  headers.update({'Authorization': 'bearer {0}'.format(r.get('token'))})
  curl = 'https://cdn2.mjunoon.tv:9191/v2/streaming-url'
  cdata = {"slug":"urdu-1-live","is_rewind":"no","type":"channel","user_id":""}
  edata = requests.post(curl, json=cdata, headers=headers).json().get('eData')
  secret = "yNNH04mZplp7xDWTnw3r8AVvAiiAPtA7"
  iv = "spfjtrbhgijlenpy"
  cipher = AES.new(secret.encode(), AES.MODE_CBC, iv.encode())
  decrypted = unpad(cipher.decrypt(binascii.unhexlify(edata)), AES.block_size)
  strurl = json.loads(decrypted).get('data', {}).get('live_stream_url')
  return strurl
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

m5Germany

Active member
Mar 20, 2014
231
73
28
Great learning/teaching Code. I can see all up to "cipher = AES.new". But then again, I do this as a hobby or a way to keep my brain active.
The crypto stuff is cool to see Coded - but beyond my reach. Still stuck writing RegEx for me as I am not proficient with writing Python.
Thanks for everything you have and do for LSP3. I really do appreciate it.
m5
 

gujal

Developer
Dec 26, 2013
539
296
63
@m5Germany Yeah, did this code just to show how Crypto can be used. Unfortunately this cannot be done using standard regex due to the complexity and needs python block
 

undpnd tqucbo

Member
Jan 25, 2021
78
0
6
I need help one more site & tk!
Code:
hxxps://rotana.net/live-lbc/
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
414
63
USA
Try this to see it works on your site - for Kodi 19.x only. I tried the Kids channel and it works fine:

LSP XML:
<item>
<title>LBC</title>
<inputstream>$doregex[getUrl]|user-agent=ipad</inputstream>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('window,document.+?(http[^\'"]+)',page_data)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','origin':'https://rotana.net','referer':'https://rotana.net/'}).text
  jdata=base64.b64decode(re.findall('"signature":"([^"]+)',source)[0]).decode('utf-8')
  m3u8=re.findall('streamUrl":"([^"]+)',jdata)[0].replace('\\','')
  source=requests.get(m3u8,headers={'user-agent':'Mozilla/5.0','origin':'https://rotana.net','referer':'https://rotana.net/'}).text
  if 'x1080' in source:
    return re.findall('x1080.*\n(.*)',source)[0]
  elif 'x720' in source:
    return re.findall('x720.*\n(.*)',source)[0]
  else:
    return re.findall('x480.*\n(.*)',source)[0]
]]></expres>
<page>https://rotana.net/live-lbc/</page>
</regex>
<thumbnail>https://rotana.net/assets/themes/TriTheme-new/images/channels/lbc.png</thumbnail>
<fanart>https://vodstaging.rotana.net/triAssets/uploads/2021/04/ramzan_bg.jpg</fanart>
</item>
 
  • Like
Reactions: undpnd tqucbo

tungbeng95

Member
Oct 25, 2018
381
12
18
No longer working.Please fix it & tks
Code:
<item>
<title>Olympic Channel</title>
<link>$doregex[makelist]</link>
<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>
 

arslion84

New member
Dec 31, 2015
6
0
1
Hi all ,

anybody tell me please , why this not works?

XML:
<item>
  <title>[B]••[I][COLOR beige][COLOR beige][COLOR lightyellow][B] VIP Portal Sinema[/B][/I][/COLOR]</title>
  <link>ignorme</link>
  <premium>True</premium>
  <jsonrpc>plugin://plugin.video.seyirTURK/</jsonrpc>
  <agent>VLC/2.2.2 LibVLC/2.2.17</agent>
<thumbnail></thumbnail></item>
 

undpnd tqucbo

Member
Jan 25, 2021
78
0
6
Can someone to help me this site & tk!
Code:
hxxps://m.futboll.tv/tv_channel/futbol_TV_HD.php
 

m5Germany

Active member
Mar 20, 2014
231
73
28
LSP3 XML:
<item>
<title>futbol_TV_HD.php | m.futboll.tv</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0</link>
<regex>
<name>m5</name>
<expres>file:"([^"]+)</expres>
<page>https://m.futboll.tv/tv_channel/futbol_TV_HD.php</page>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

undpnd tqucbo

Member
Jan 25, 2021
78
0
6
Can I get help one more site & tk!
Code:
hxxp://onair.imbc.com/?chid=0
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
414
63
USA
If use the code tag, use http instead of hxxp. Try this:

LSP XML:
<item>
<title>MBC</title>
<link>$doregex[makelist]</link>
<thumbnail>https://www.freeradiotune.com/wp-content/uploads/2016/01/Andong-MBC.jpg</thumbnail>
<regex>
<name>makelist</name>
<expres><![CDATA[#$pyFunction
import re,requests,time
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  now=int((time.time()) * 1000)
  onairUrl=re.findall('this.onairUrl.+?"([^"]+)',page_data)[0]+'&t=%s'%now
  source=requests.get(onairUrl,headers={'user-agent':'Mozilla/5.0','origin':'http://onair.imbc.com','referer':'http://onair.imbc.com/?chid=0','accept':'*/*'}).text
  return re.findall('"MediaURL":"([^"]+)',source)[0]+'|user-agent=ipad&referer=http://onair.imbc.com/?chid=0'
]]></expres>
<page>http://playvod.imbc.com/player/onair/lib/mbcplayer.js</page>
<referer>http://onair.imbc.com/</referer>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

m5Germany

Active member
Mar 20, 2014
231
73
28
Not Python - but - Change 1000k to 600k for lower quality
LSP3 XML:
<item>
<title>mbn.co.kr</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>https://$doregex[m5]|User-Agent=Mozilla/5.0&amp;Referer=https://www.mbn.co.kr/vod/onair</link>
<regex>
<name>m5</name>
<expres>(hls[^\s]+)</expres>
<page>https://www.mbn.co.kr/player/mbnStreamAuth_new_live.mbn?vod_url=https://hls-live.mbn.co.kr/mbn-on-air/1000k.stream/playlist.m3u8</page>
<referer>https://www.mbn.co.kr/vod/onair</referer>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

streamwatcher2013

Well-known member
Oct 24, 2013
931
414
63
USA
For python on MBN

LSP XML:
 <item>
<title>MBN</title>
<link>$doregex[getUrl]</link>
<thumbnail>https://img.mbn.co.kr/newmbn/main2018/logo.gif</thumbnail>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  jlink='https://'+re.findall('src=.+?//(.+?embedVideoPlayer[^"]+)',page_data)[0]
  source=requests.get(jlink,headers={'user-agent':'Mozilla/5.0','referer':'https://www.mbn.co.kr/vod/onair','accept':'*/*'}).text
  while 'LiveContents_2020' in source:
    cmsurl='https://'+re.findall('cms_url.+?//([^"]+)',source)[0]
    print cmsurl
  else:
    cmsurl='https://'+re.findall('cms_url.+?//([^"]+)',source)[0].replace('2017','2020')
    print cmsurl
  source=requests.get(cmsurl,headers={'user-agent':'Mozilla/5.0','referer':'https://www.mbn.co.kr/vod/onair','accept':'*/*'}).text
  surl=re.findall('"high".+?url".+?//([^"]+)',source)[0]
  if '1000k' in source:
    url='https://www.mbn.co.kr/player/mbnStreamAuth_new_live.mbn?vod_url=https://%s'%surl
    source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'https://www.mbn.co.kr/vod/onair','accept':'*/*'}).text
    return re.findall('(.*)',source)[0]+'|user-agent=ipad&referer=https://www.mbn.co.kr/vod/onair'
  else:
    url='https://www.mbn.co.kr/player/mbnStreamAuth_new_live.mbn?vod_url=https://'+surl.replace('high','low')
    source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'https://www.mbn.co.kr/vod/onair','accept':'*/*'}).text
    return re.findall('(.*)',source)[0]+'|user-agent=ipad&referer=https://www.mbn.co.kr/vod/onair'
]]></expres>
<page>https://www.mbn.co.kr/vod/onair</page>
<referer>https://www.mbn.co.kr/</referer>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

streamwatcher2013

Well-known member
Oct 24, 2013
931
414
63
USA
updates version for python code on MBN

LSP XML:
 <item>
<title>MBN</title>
<link>$doregex[getUrl]</link>
<thumbnail>https://img.mbn.co.kr/newmbn/main2018/logo.gif</thumbnail>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  jlink='https://'+re.findall('src=.+?//(.+?embedVideoPlayer[^"]+)',page_data)[0]
  source=requests.get(jlink,headers={'user-agent':'Mozilla/5.0','referer':'https://www.mbn.co.kr/vod/onair','accept':'*/*'}).text
  curl,strID=re.findall('cms_url.+?//(.+?Contents_(\d+)[^"]+)',source)[0]
  while 'LiveContents_2020' in source:
    cmsurl='https://%s'%curl
    print cmsurl
  else:
    cmsurl='https://'+curl.replace('%s'%strID,'2020')
    print cmsurl
  source=requests.get(cmsurl,headers={'user-agent':'Mozilla/5.0','referer':'https://www.mbn.co.kr/vod/onair','accept':'*/*'}).text
  surl='https://www.mbn.co.kr/player/mbnStreamAuth_new_live.mbn?vod_url=https://'+re.findall('"high".+?url".+?//([^"]+)',source)[0]
  if '1000k' in surl:
    source=requests.get(surl,headers={'user-agent':'Mozilla/5.0','referer':'https://www.mbn.co.kr/vod/onair','accept':'*/*'}).text
    return re.findall('(.*)',source)[0]+'|user-agent=ipad&referer=https://www.mbn.co.kr/vod/onair'
  else:
    source=requests.get(surl.replace('high','low'),headers={'user-agent':'Mozilla/5.0','referer':'https://www.mbn.co.kr/vod/onair','accept':'*/*'}).text
    return re.findall('(.*)',source)[0]+'|user-agent=ipad&referer=https://www.mbn.co.kr/vod/onair'
]]></expres>
<page>https://www.mbn.co.kr/vod/onair</page>
<referer>https://www.mbn.co.kr/</referer>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

Doom

Member
Sep 16, 2019
292
21
18
Stopped working can i please get a fix & thanks!
LSP XML:
<item>
<title>[COLOR gold]NBA EVENTS[/COLOR]</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 href='([^']+)[\w\W]*?g'>\s*([^<]+).*\n.*?-\s([^<]+)]]></expres>
<page>http://crackstreams.is/nba-streams/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,base64
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  if 'window.atob' in page_data:
    decode=re.findall('window.atob.[\'"]([^\'"]+)',page_data)[0]
    return base64.b64decode(decode).decode('utf-8')+'|user-agent=ipad&origin=http://crackstreams.is&referer=http://crackstreams.is/nba-streams/'
  else:
    return re.findall('id="play[\w\W]+?(?:source|src|file):\s*[\'"](htt[^\'"]+)',page_data)[0]+'|user-agent=ipad&origin=http://crackstreams.is&referer=http://crackstreams.is/nba-streams/'
]]></expres>
<page>[makelist.param1]video.php</page>
<referer>[makelist.param1]</referer>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
414
63
USA
Replace the below section

LSP XML:
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  url=re.findall('<iframe.+?src=[\'"](.+?crackstreams[^\'"]+)',page_data)[0];ref='[makelist.param1]'[:-13]
  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://crackstreams.is&referer=http://crackstreams.is/'
  else:
    return re.findall('id="play[\w\W]+?(?:source|src|file):\s*[\'"](htt[^\'"]+)',psource)[0]+'|user-agent=ipad&origin=http://crackstreams.is&referer=http://crackstreams.is/'
]]></expres>
<page>[makelist.param1]</page>
<referer>http://crackstreams.is/</referer>
</regex>
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
414
63
USA
It went back to previous code. Try this

LSP XML:
<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://crackstreams.is&referer=http://crackstreams.is/'
    else:
      return re.findall('id="play[\w\W]+?(?:source|src|file):\s*[\'"](htt[^\'"]+)',psource)[0]+'|user-agent=ipad&origin=http://crackstreams.is&referer=http://crackstreams.is/'
  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://crackstreams.is&referer=http://crackstreams.is/'
    else:
      return re.findall('id="play[\w\W]+?(?:source|src|file):\s*[\'"](htt[^\'"]+)',psource)[0]+'|user-agent=ipad&origin=http://crackstreams.is&referer=http://crackstreams.is/'
]]></expres>
<page>[makelist.param1]</page>
<referer>http://crackstreams.is/</referer>
</regex>
 
  • Winner
Reactions: Doom

udomrat

New member
Nov 10, 2016
20
5
3
thailand
Code:
crypt_url = '{"ciphertext":"xFrESdPnprIwJIVxuF1jRxxJ001XRebesgOvgenzHMm\/26sRNzVJk57V70MUBYyDcaxTGZcggqHYJkQokReaNYyZWGmdDnUb5QifYZXRfbhPLdd2OcBzo0ZebPZ7\/1jyhoLJpo6nJ0F2fs7FA40pMVczJ8cnZiTIlzJUtbl9zj0vrhIJbduCROif85ijkhQ3N4MSWebhExUsgkwUzoKQXBcA7oJJdoS6VhBdEmiLBxi5OwXs21DPDXhGVBylhsWGj7BCVMcnXVU2vkvtPGDphVGYQcYFW8M8WBsamPw6UOSUFkrZXyQlJZYqGJzAxrSXOxjJmDe6io5HXBWiIYbh4WfYOSn+8jnCFG62U72kX54vUzoagQUYqqHI79egnxlMYNZtseTy9W6Lc0+Bh21m2fFnqLLWvzDY9X34ZtF8B1eBKuVGy9Ri\/N35w6DWZ27ck7xbsSCV91kMERkX9RnaSJwP0b3dhAIjeRHsShGEZR+UsWAD43fu4TezX8WVc68WHT5X5LK0qaSRjuWSA6YDfcQfd9dC2q\/HywS0yRIjpGuOrnwHWh\/u+MGHm2vPiO9MxtHyKMzxbQsTwKYjSSiH9Ejw7IHZfN1+g4\/QIPlLilA=","iv":"4abe19f18de3a0dfab15902ed98d91e1","salt":"f60f33d1b57aecd9dd4871c944deb11c06b1f8963be3aba9afa3ec92ac39ad196e06d20b54445902f7f71e9f7080f209ada30e459891f1f39c15f56baaf45c59226c98756f2750be3425e02a692cd3b263035e936a9f08e9a4cd2a48827c8d76cbc67bc74814a878d50119c6f6afdab2cd5dfbb71d81072ed8e69a92d76f4d230f1d698e4ef53ae006269e2e4d2e4e6cd7d2108c6b767a306f5d0578e86a34fdf3387613f248f20ef74f12764413a16324beb58d6e01c56e1b1aa5ed1b21a6d2d5b0a3532001fa16266fba060a14ba2ea9a5aa2bdf8326047a20daa01de5677bc9fca0ccedf6876a21caac78b246aaecae9e17649599b6f18d90c54317b5d9d4"}';
Code:
**python2

<regex>
<name>Url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, json, pyaes, jscrypto, hashlib
  e = re.findall("crypt_url\s*=\s*'([^']+)",page_data)[0]
  e = json.loads(e)
  iv = e['iv'].decode('hex')
  salt = e['salt'].decode('hex')
  data = e['ciphertext'].decode('base64')
  secret = jscrypto.PBKDF2("ThisKeyIsForEmbedding!", salt, 999, 32, hashlib.sha512)
  decryptor = pyaes.new(secret, pyaes.MODE_CBC, IV=iv)
  surl = decryptor.decrypt(data).strip()
  return surl[:-ord(surl[-1])]
]]></expres>
<page>xxxxx</page>
<referer>xxxx</referer>
<agent>Mozilla/5.0</agent>
<cookieJar></cookieJar>
</regex>
How to in python3?
 

kavan

Member
Aug 14, 2016
71
5
8
Hello
Please is it possible to have a makelist
Code:
https://www.gemonline.tv/en-US/Categories/Index?categoryId=1234568
Thank you in advance!
 

streamwatcher2013

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

LSP XML:
<item>
<title>https://www.gemonline.tv/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param3][/COLOR]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param2]</thumbnail>
  <info>[makelist.param4]</info>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  list=re.findall('class="elementor-widget-container">(?s)(.*?)"footer"',page_data)[0]
  return re.findall('"elementor-post__card">[\w\W]+?href="([^"]+)[\w\W]+?src="([^"]+)[\w\W]+?href.+\n.+?(\w[^\n]+)[\w\W]+?<p>[\w\W]+?(\w[^\n]+)',list)
]]></expres>
<page>https://www.gemonline.tv/en-US/Categories/Index?categoryId=1234568</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist2.param2][/COLOR]</title>
  <link>[makelist2.param1]|user-agent=ipad</link>
  <thumbnail>[makelist.param2]</thumbnail>
  <info>[makelist.param4]</info>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  ref='https://www.gemonline.tv//[makelist.param1]';link=ref.replace('/Info','/StartWatching')
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'}).text
  return re.findall('data-video-source="([^"]+)[\w\W]+?thumbnail-title">([^<]+)',source)
]]></expres>
<page></page>
</regex>
<thumbnail>https://www.gemonline.tv/Assets_New/logo/logo.png?1212</thumbnail>
</item>
 
  • Like
Reactions: kavan

Doom

Member
Sep 16, 2019
292
21
18
Could i please get here just in 720p if it's possible & thanks!
LSP XML:
https://pophqm.yowi.tv/
 
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5