LSP Regex & Makelist Discussion.

Doom

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

gujal

Developer
Dec 26, 2013
526
290
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
526
290
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
526
290
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
48
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
202
56
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
910
395
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
910
395
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
48
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
202
56
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
48
0
6
Can someone help me this site & tk!
Code:
hxxps://www.mjunoon.tv/urdu-1-live
 

gujal

Developer
Dec 26, 2013
526
290
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
202
56
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
 
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5