LSP Regex & Makelist Discussion.

m5Germany

Active member
Mar 20, 2014
327
105
43
Greetings,
Would like some help on/with https://nflstream.io/nfl-network-live/stream-1. It has Post w/ cookie (needed).
Also, https://www.tvply.me/peercheck
Final Goal is to write a makelist for: https://nflstream.io/
I tried writing the Post but no success. Thanks, m5
 

gujal

Developer
Dec 26, 2013
590
326
63
The post can be done but the returning page has lot of javascript to process to get the actual `h.u.n.t.e.r` obfuscated code. Once you get that code you can use the jsunhunt and get the streamurl. but getting the obfuscated code is a complex task
The code below pulls the page with the correct post. The page now needs to be processed for all the javascript in it and deobfuscate before you can regex the playUrl
Code:
<item>
<title>NFLnet IO</title>
<link>https:$doregex[getUrl]</link>
<thumbnail></thumbnail>
<regex>
<name>getUrl</name>
<expres>playUrl\s*:\s*'([^']+)</expres>
<page>https://www.tvply.me/sdembed?v=$doregex[postparam]</page>
<rawpost>pid=$doregex[pid]&amp;ptxt=$doregex[postdata]</rawpost>
<referer>https://nflstream.io/</referer>
<origin>https://nflstream.io</origin>
</regex>
<regex>
<name>pid</name>
<expres>pid\s*=\s*(\d+)</expres>
<page>https://nflstream.io/nfl-network-live/stream-1</page>
<referer>https://nflstream.io/</referer>
</regex>
<regex>
<name>postdata</name>
<expres>pdettxt\s*=\s*"([^"]+)</expres>
<page>https://nflstream.io/nfl-network-live/stream-1</page>
<referer>https://nflstream.io/</referer>
</regex>
<regex>
<name>postparam</name>
<expres>zmid\s*=\s*"([^"]+)</expres>
<page>https://nflstream.io/nfl-network-live/stream-1</page>
<referer>https://nflstream.io/</referer>
</regex>
<thumbnail></thumbnail>
</item>
 
  • Like
Reactions: m5Germany

m5Germany

Active member
Mar 20, 2014
327
105
43
Gujal,
Glad to see you again. Still can't get this Post thing right.
I read whatever I can but without real Code examples, I get lost.
I understand all you have written, Thank You, and did similar w/ a
prior example you had written for me and tried to adapt from there.

<regex>
<name>getUrl</name>
<expres>link":\s*"([^"]+)</expres>
<page>h tps://www.stream2watch.one/calls/get/source</page>
<referer>h tps://www.stream2watch.one/</referer>
<origin>h tps://www.stream2watch.one</origin>
<x-req>XMLHttpRequest</x-req>
<post>h:$doregex[data]</post>
</regex>
<regex>
<name>data</name>
<expres>data-sh="([^"]+)</expres>
<page>h tps://www.stream2watch.one/streaming-television/eurosport-stream</page>
<referer>h tps://www.stream2watch.one/</referer>
</regex>

Anyway, Thanks for explaining. I do not have enough knowledge to move forward with site.

Couple of questions:
You know I use Fiddler - Is there something else you use that would help me see more?
Any chance I can get your opinion on cfscrape.create_scraper() from Post #1,420

If not, I understand.
Thanks, m5
 

gujal

Developer
Dec 26, 2013
590
326
63
cfscrape doesnt work anymore ever since cloudflare changed the mechanisms last year. So unfortunately cant help there. There is no working python code to bypass cloudflare currently. There is another project called cloudscraper which also is not working for most cloudflare sites
 
  • Like
Reactions: m5Germany

arslion84

New member
Dec 31, 2015
8
0
1
Hi all

can anybody help me to fix

XML:
<item><title>[COLOR violet]• [B]Süperlig[/B][/COLOR] Maç Özetler</title><link>$doregex[makelist]</link><regex><name>makelist</name><listrepeat><![CDATA[<title>[makelist.param1]</title><link>$doregex[video]</link><thumbnail>NA</thumbnail>]]></listrepeat><expres>data-title='(.*?)'.*data-video='(.*?)'</expres><page>https://beinsports.com.tr/mac-ozetleri-goller/super-lig</page><cookieJar></cookieJar><agent>Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36</agent></regex><regex><name>video</name><expres>$pyFunction:'[makelist.param2]'.replace(';','&amp;')</expres><page></page></regex>
<info>Futbol videoları ve maçların gollerini izleyin. Süper Lig maç özetleri maçlardan hemen sonra buradan bakabilirsiniz, futbolun kalbi burada atıyor</info><thumbnail>https://www.dropbox.com/s/18ejwn03vdj/macozet1.jpg?dl=1</thumbnail><fanart>https://www.dropbox.com/s/f6ndts69op74g6q/beinwpaper.png?dl=1</fanart></item>
 

undpnd tqucbo

Member
Jan 25, 2021
158
2
18
Can I get help for site & tk?
Code:
https://tv.vera.com.uy/play/2s68l
 

m5Germany

Active member
Mar 20, 2014
327
105
43
So, the Key is the API Token d5q60x0jaOQB3A98A4SSPjww
I tried to write a Post RegEx (below) but does not work. Still learning.
If someone would write the Post request - it will make the Code complete.
The Code should work until the token changes.
LSP3 XML:
<item>
<title>Al_Jazeera RegEx</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Accept=*/*&amp;Origin=https://tv.vera.com.uy&amp;Referer=https://tv.vera.com.uy/</link>
<regex>
<name>m5</name>
<expres>url":"([^"]+)</expres>
<page><![CDATA[https://veratv-be.vera.com.uy/api/setup?token=d5q60x0jaOQB3A98A4SSPjww&public_id=2s68l]]></page>
<accept>application/json</accept>
<agent>Mozilla/5.0</agent>
<referer>https://tv.vera.com.uy/</referer>
</regex>
</item>
 
<item>
<title>RawPost not working</title>
<link>https:$doregex[getAPI]</link>
<regex>
<name>getAPI</name>
<expres>token":"([^"]+)</expres>
<page>https://veratv-be.vera.com.uy/api/sesiones</page>
<accept>application/json</accept>
<agent>Mozilla/5.0</agent>
<referer>https://tv.vera.com.uy/</referer>
<origin>https://tv.vera.com.uy</origin>
<rawpost>tipo:anonima</rawpost>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

gujal

Developer
Dec 26, 2013
590
326
63
Enjoy!

LSP XML:
<item>
<title>Al_Jazeera</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,url="https://tv.vera.com.uy/play/2s68l"):
  import re, requests
  tokenurl = "https://veratv-be.vera.com.uy/api/sesiones"
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0',
             'Origin': 'https://tv.vera.com.uy',
             'Referer': 'https://tv.vera.com.uy/'}
  pdata = {"tipo":"anonima"}
  jd = requests.post(tokenurl, json=pdata, headers=headers).json()
  curl = "https://veratv-be.vera.com.uy/api/setup?token={1}&public_id={0}"
  curl = curl.format(url.split('/')[-1], jd.get('token'))
  data = requests.get(curl, headers=headers).json()
  return data.get('url').get('available')[0].get('playbackUrl').get('url')
]]></expres>
<page></page>
</regex>
</item>
 

gujal

Developer
Dec 26, 2013
590
326
63
And here is the full makelist. It plays mosts channels unless geo-restricted to Uruguay. Enjoy!
LSP XML:
<item>
<title>Vera TV</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param1][/COLOR]</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<thumbnail>[makelist.param2]</thumbnail>
<info>[makelist.param3]</info>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import requests
  tokenurl = "https://veratv-be.vera.com.uy/api/sesiones"
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0',
             'Origin': 'https://tv.vera.com.uy',
             'Referer': 'https://tv.vera.com.uy/'}
  pdata = {"tipo":"anonima"}
  jd = requests.post(tokenurl, json=pdata, headers=headers).json()
  token = jd.get('token')
  headers.update({
    "x-service-id": str(jd.get('id_servicio')),
    "x-frontend-id": str(jd.get('id_frontend')),
    "x-system-id": "1",
    "authorization": "Bearer " + jd.get('jwt')
  })
  curl = "https://cds-frontend.vera.com.uy/api-contenidos/listas/68?token={0}"
  curl = curl.format(token)
  jd = requests.get(curl, headers=headers).json()
  data = [(x['nombre'], x['imagen_principal'], x['descripcion'], token, x['public_id']) for x in jd.get('contenidos')]
  return data
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import requests
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0',
             'Origin': 'https://tv.vera.com.uy',
             'Referer': 'https://tv.vera.com.uy/'}
  curl = "https://veratv-be.vera.com.uy/api/setup?token={0}&public_id={1}"
  curl = curl.format('[makelist.param4]', '[makelist.param5]')
  data = requests.get(curl, headers=headers).json()
  return data.get('url').get('available')[0].get('playbackUrl').get('url')
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: m5Germany

m5Germany

Active member
Mar 20, 2014
327
105
43
Gujal, Thanks for the Python Block. Still not 100% on this - but- was able to understand
what your Code was/is doing. Took a little different approach to test my theory/thinking.
Used your Python Block to get the "curl" and then used RegEx for final.
Also, did a search for/of "curl.format(url.split('/')[-1]" and getting closer to fully
understanding - but - not there yet. Working on it. Thanks, m5
LSP3 XML:
<item>
<title>Al_Jazeera Redux</title>
  <link>$doregex[m5]|User-Agent=iPad</link>
    <regex>
      <name>m5</name>
      <expres>playbackUrl".."url":"([^"]+)</expres>
      <page>$doregex[getUrl]</page>
      <accept>application/json</accept>
      <agent>Mozilla/5.0</agent>
      <referer>https://tv.vera.com.uy/</referer>
    </regex>
    <regex>
      <name>getUrl</name>
      <expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,url="https://tv.vera.com.uy/play/2s68l"):
  import re, requests
  tokenurl = "https://veratv-be.vera.com.uy/api/sesiones"
  headers = {'User-Agent': 'Mozilla/5.0',
             'Origin': 'https://tv.vera.com.uy',
             'Referer': 'https://tv.vera.com.uy/'}
  pdata = {"tipo":"anonima"}
  jd = requests.post(tokenurl, json=pdata, headers=headers).json()
  curl = "https://veratv-be.vera.com.uy/api/setup?token={1}&public_id={0}"
  curl = curl.format(url.split('/')[-1], jd.get('token'))
  return curl
]]></expres>
<page />
</regex>
</item>
 

gujal

Developer
Dec 26, 2013
590
326
63
@m5Germany
the split is just getting the last bit which is the stream id. see below
curl.format() basically replaces {0} and {1} with the variables mentioned. see the effect below when applied
Code:
C:\Users\gujal>python

Python 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:52:53) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> url="https://tv.vera.com.uy/play/2s68l"
>>> url.split('/')[-1]
'2s68l'
>>>
>>> curl = "https://veratv-be.vera.com.uy/api/setup?token={1}&public_id={0}"
>>> token = "blahblahblah"
>>> curl = curl.format(url.split('/')[-1], token)
>>> curl
'https://veratv-be.vera.com.uy/api/setup?token=blahblahblah&public_id=2s68l'
>>>
 
  • Like
Reactions: m5Germany

m5Germany

Active member
Mar 20, 2014
327
105
43
Gujal, I think I've got it? Thanks, m5
Info:
https://     [-3]     /[-2]/[-1]
h tps://tv.vera.com.uy/play/2s68l
url.split('/')[-1]   returns   2s68l
url.split('/')[-2]   returns   play
url.split('/')[-3]   returns   tv.vera.com.uy
https://   returns   everything after //
url.split('//')[-1]  returns   tv.vera.com.uy/play/2s68l
 

Doom

Member
Sep 16, 2019
321
21
18
Stopped working can i get a fix and thanks!
LSP XML:
<item>
<title>Azteca Cinema</title>
<thumbnail>https://www.televisiongratishd.com/img/azcinema.png</thumbnail>
<fanart>https://www.metropoliabierta.com/uploads/s1/23/02/01/captura-de-pantalla-2018-05-07-a-las-15-47-45.png</fanart>
<link>$doregex[getUrl]|user-agent=iPad&amp;Referer=https://live.televisiongratishd.com/&amp;verify=False</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests, base64, jsunpack
  link = re.findall('<iframe\s*src=[\'"]([^#]+)', page_data)[0]
  page_data = requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://www.televisiongratishd.com/live/azcinema1.php?id=54_','accept':'*/*'}, verify=False).text
  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://www.televisiongratishd.com/live/azcinema1.php?id=54_</page>
<referer>https://www.televisiongratishd.com/live/azcinema.php</referer>
</regex>
</item>
 

gujal

Developer
Dec 26, 2013
590
326
63
Enjoy!

LSP XML:
<item>
<title>Azteca Cinema</title>
<thumbnail>https://www.televisiongratishd.com/img/azcinema.png</thumbnail>
<fanart>https://www.metropoliabierta.com/uploads/s1/23/02/01/captura-de-pantalla-2018-05-07-a-las-15-47-45.png</fanart>
<link>$doregex[getUrl]|user-agent=iPad&amp;Referer=$doregex[getIframe]&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>$doregex[getIframe]</page>
<referer>https://www.televisiongratishd.com/live/azcinema.php</referer>
</regex>
<regex>
<name>getIframe</name>
<expres>iframe\s*src=[\'"]([^#"']+)</expres>
<page>https://www.televisiongratishd.com/live/azcinema1.php?id=54_</page>
<referer>https://www.televisiongratishd.com/live/azcinema.php</referer>
</regex>
</item>
 

gujal

Developer
Dec 26, 2013
590
326
63
I presume you are using it on Kodi Leia, and yes it wont work there as the cert issuer for telelatino website is not trusted by Leia
The certifi module on Leia version is 2019.9.11 which is quite old
It works fine on Matrix as certifi version is 2020.12.05
Cant do much unless certifi module is updated for Leia (I dont think that will happen)
 

gujal

Developer
Dec 26, 2013
590
326
63
Why run buggy 19 Alpha 3? if you are on 19 you might as well be running the 19.1 released version and on that the above code works fine
 

Catmantx

Member
Nov 2, 2020
67
3
8
Hello, I think is simple but can't get it o work with old scripts.
Can you please make this on?

Thank you in advance!!!
Code:
hxxps://filme24.club/embed/eurosport-1.html
 

gujal

Developer
Dec 26, 2013
590
326
63
Enjoy!

LSP XML:
<item>
<title>Eurosport 1</title>
<link>$doregex[getUrl]|User-Agent=iPad&amp;Referer=https://filme24.club/</link>
<thumbnail>https://discovery-assets-production.s3.eu-west-1.amazonaws.com/app/uploads/2019/04/03130804/logo-eurosport-1-hd.jpg</thumbnail>
<regex>
<name>getUrl</name>
<expres>source:\s*'([^']+)</expres>
<page>https://filme24.club/embed/eurosport-1.html</page>
<referer>https://filme24.club/</referer>
<cookiejar>$doregex[getCookie]</cookiejar>
</regex>
<regex>
<name>getCookie</name>
<expres></expres>
<page>https://filme24.club/tv-live/?url=eurosport-1</page>
<referer>https://filme24.club/</referer>
<cookiejar></cookiejar>
</regex>
</item>
 
  • Like
Reactions: Catmantx

nkt9911

Member
May 22, 2021
39
0
6
USA
Hi.
Can anyone help me with the site?
Code:
https://ztv.uz/online-tv/sd/121-kinoteatr.html
 

m5Germany

Active member
Mar 20, 2014
327
105
43
LSP3 XML:
<item>
<title>Kinoteatr ztv.uz</title>
<fanart>https://ohcbrands.com/wp-content/uploads/2018/05/black-background.jpg</fanart>
<thumbnail>https://ztv.uz/templates/Default/images/logo.png</thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Accept=*/*&amp;Origin=https://ztv.uz&amp;Referer=https://ztv.uz/</link>
<regex>
<name>m5</name>
<expres>embedUrl":\s*"([^"]+)</expres>
<page>https://ztv.uz/online-tv/sd/121-kinoteatr.html</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://ztv.uz/</referer>
<cookiejar>$doregex[getCookie]</cookiejar>
</regex>
<regex>
<name>getCookie</name>
<expres></expres>
<page>https://ztv.uz/online-tv/sd/121-kinoteatr.html1</page>
<referer>https://ztv.uz/</referer>
<cookiejar></cookiejar>
</regex>
</item>
 
  • Like
Reactions: nkt9911

gladio

New member
Oct 14, 2018
24
3
3
Code:
I know that addon already exists. it is possible to do makelist thanks

[CODICE]https://www.mixcloud.com/live/Centreforce883/[/CODICE]
 

thingy

Member
May 9, 2018
80
1
8
Dear @m5Germany I tell you that I have a site that uses two addresses depending on the event, which up to this moment I have managed to capture stored in wigi ... what happens is that I need to insert the two addresses that I have so far in the same code to that when the event occurs emit the one that is online.
Code:
<item>
<title>FPD|http://www.fpdenvivo.com </title>
<thumbnail>https://i.pinimg.com/originals/8f/cf/bf/8fcfbf7806e7e905881fe7b893007be9.png</thumbnail>
<fanart>https://i.pinimg.com/originals/8f/cf/bf/8fcfbf7806e7e905881fe7b893007be9.png</fanart>
<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>http://www.fpdenvivo.com/</referer>
  </regex>
  <regex>
    <name>m4</name>
    <expres>$pyFunction:get_unpacked(page_data,'(eval.*m3u8.*)')</expres>
    <page>https://wigistream.to/embed/vfbpau|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://www.fpdenvivo.com/</referer>
  </regex>
</item>

address I want to add

<page>https://wigistream.to/embed/mb47z3dl|Upgrade-Insecure-Requests=1</page>
 

m5Germany

Active member
Mar 20, 2014
327
105
43
First off, I do not remember Coding for h tp://www.fpdenvivo.com/. Second, the Code you provided does not work w/ either URL you included.
Thirdly, cannot Code w/ embed as it is domain protected and you did not provide the working stream(s) to sniff.
So, If you used my Code written for another site there is no guarantee it will work.

The members that assist w/ Code on this Forum should not be asked directly to Code for anyone. The Code request should be asked to the Forum as a whole.
Personally, I wish not to be asked directly because: 1. I do not want to feel obligated to Code something just because someone asks.
2. I might not have the knowledge to Code it. 3. A more experienced Coder may have a better solution (Python).

It's not personal - It's my rule in my head, others may feel differently.

Finally, when I can/do Code a URL means that I have engaged in that conversation and further questions if necessary (are/may be) prudent.

Example: If wanted a URL Coded I would ask Gujal every time. It's not his responsibility to respond just because I asked. If he engages with a solution
and then I have a question - I will ask him directly. Informed consent.

So, re-ask the question to the Forum in whole with the two working links and if possible I'm sure one of the Coders will assist you.
 

thingy

Member
May 9, 2018
80
1
8
sorry for not explaining the content well, the code if it is modified in the objective, it has worked when it is on the air, please omit the recipient and whoever is interested in contributing an idea is not obliged to do so as we all know. My apologies again to M5
 

undpnd tqucbo

Member
Jan 25, 2021
158
2
18
Can I get help a site & tk!
Code:
https://www.tvr.by/televidenie/belarus-24/
 

gujal

Developer
Dec 26, 2013
590
326
63
Enjoy!

LSP XML:
<item>
<title>Belarus 24</title>
<link>$doregex[getUrl]|User-Agent=iPad&amp;Referer=https://www.tvr.by/</link>
<regex>
<name>getUrl</name>
<expres>(?s)source\s*src="([^""]+)</expres>
<page>https://www.tvr.by/plugines/online-tv-main.php?channel=tv&amp;chan_id=bt24&amp;only_tv=Y</page>
<referer>https://www.tvr.by/</referer>
<x-req>XMLHttpRequest</x-req>
</regex>
<thumbnail>https://belarus24.by/local/templates/b24new/images/logo.png</thumbnail>
</item>
 
  • Like
Reactions: undpnd tqucbo

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
Try this. It's working on Kodi 18. Add verify = False for SSL hand shake.

LSP XML:
<item>
<title>Беларусь 24</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re, requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  source = requests.get('https://www.tvr.by/televidenie/belarus-24/',headers={'user-agent':'Mozilla/5.0','referer':'https://www.tvr.by/','accept':'*/*'},verify=False).text
  url = re.findall('mytvset.{2,4}load..([^\'"]+)',source)[0]
  source = requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'https://www.tvr.by/televidenie/belarus-24/','accept':'*/*'},verify=False).text
  return re.findall('src=.(.+?m3u8[^\'"]+)',source)[0]+'|user-agent=ipad&origin=https://www.tvr.by&referer=https://www.tvr.by/'
]]></expres>
<page></page>
</regex>
</item>
 
Jun 6, 2017
37
0
6
Please help for this:

Code:
hxxps://daddylive.me/embed/stream-136.php
 

regixman

Member
May 30, 2018
37
1
8
capitainehardlock


fox-sport:
 <item>
<title>[COLOR white]fox-sport[/COLOR]</title>
<thumbnail></thumbnail>
<link>$doregex[getUrl]|user-agent=ipad&referer=https://www.eplayer.to/</link>
<expression régulière>
<name>getUrl</name>
<expres><![CDATA[Clappr.Player[\w\W]+?(?:source|src|file):\s*[\'"]([^\'"]+)]]>< /exprimer>
<page>https://www.eplayer.to/poscitech.php?live=136</page>
<referer>https://poscitech.club/tv/ch116.php</referer>
</regex>
</item>
 
  • Like
Reactions: captainhardlock

undpnd tqucbo

Member
Jan 25, 2021
158
2
18
Can someone help me a site & tk.
Code:
https://www.rtvs.sk/televizia/live-1
 
  • Like
Reactions: tungbeng95

m5Germany

Active member
Mar 20, 2014
327
105
43
This has been Tested using Kodi 19.0 w/ LSPro ver:3.0.0~alpha4 on Windows 10 system.
Channel not always active and some programs are restricted to Slovakia.
No clue on how to retrograde to Kodi 18.9
LSP3 XML:
<item>
<title>https://www.rtvs.sk/televizia/live-1</title>
<fanart>https://oficina.design/wp-content/uploads/2015/05/kultura1.jpg</fanart>
<thumbnail>https://evidei.com/wp-content/uploads/Radio_and_Television_Slovakia_Logo.png</thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Accept=*/*&amp;Origin=&amp;Referer=https://www.rtvs.sk/</link>
<regex>
<name>m5</name>
<expres>src"\s*:\s*"([^"]+)[\w\W]*?x-</expres>
<page><![CDATA[https://www.rtvs.sk/json/live5f.json?c=1&b=chrome&p=win&v=93&f=0&d=1]]></page>
<connection>keep-alive</connection>
<agent>Mozilla/5.0</agent>
<accept>*/*</accept>
<x-req>XMLHttpRequest</x-req>
<referer>https://www.rtvs.sk/embed/live/1</referer>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

undpnd tqucbo

Member
Jan 25, 2021
158
2
18
No longer working...Can i get a fix? Tk.
Code:
<item>
<title>Visiem LTV.LV</title>
<link>https:$doregex[getUrl]|User-Agent=iPad&amp;Referer=https://embed.cloudycdn.services/</link>
<regex>
<name>getUrl</name>
<expres>src:\s*'([^']+)</expres>
<page>https://embed.cloudycdn.services/ltvlive/channel/ymc_ltv09-visiem/?player=regular&amp;protocol=hls</page>
<referer>https://ltv.lsm.lv/</referer>
</regex>
</item>
 

m5Germany

Active member
Mar 20, 2014
327
105
43
This Code does not work: In theory it should. Getting the following error in log:
INFO <general>: CVideoPlayer Process - eof reading from demuxer
Additionally, if I add https:// before $doregex[m5] the log shows:
<general>: XFILE::CDirectory::GetDirectory - Error getting h tps://h tps//ltvlive2167
Expected return should have been:
h tps://h tps://ltvlive2167 then drop https:// before $doregex[m5] to get: h tps://ltvlive2167
Notice there is NO ":" in h tps://h tps//ltvlive2167
Why? Any ideas?
Info:
<item>
<title>Visiem LTV.LV - NOT WORKING - TESTING</title>
<link>$doregex[m5]</link>
<regex>
<name>m5</name>
<expres>$pyFunction:'$doregex[m4]'.replace('\\','')</expres>
<page></page>
<referer><![CDATA[https://embed.cloudycdn.services/ltvlive/channel/ymc_ltv09-visiem/?player=regular&protocol=hls]]></referer>
</regex>
<regex>
<name>m4</name>
<expres>src":"([^"]+)</expres>
<page>https://embed.cloudycdn.services/player/ltvlive/channel/ymc_ltv09-visiem/</page>
<accept>application/json,text/javascript,*/*; q=0.01</accept>
<x-req>XMLHttpRequest</x-req>
<agent>Mozilla/5.0</agent>
<origin>https://embed.cloudycdn.services</origin>
<referer><![CDATA[https://embed.cloudycdn.services/ltvlive/channel/ymc_ltv09-visiem/?player=regular&protocol=hls]]></referer>
<post><![CDATA[referer=https://embed.cloudycdn.services/ltvlive/channel/ymc_ltv09-visiem/?player=regular&protocol=hls]]></post>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

gujal

Developer
Dec 26, 2013
590
326
63
@m5Germany
Two small issues.
  1. The post you are doing is a rawpost but the tags were set as post instead of a rawpost
  2. The final url needs a referer and ua
Enjoy!

LSP XML:
<item>
<title>Visiem LTV.LV</title>
<link>$doregex[m5]|Referer=https://embed.cloudycdn.services/&amp;User-Agent=iPad</link>
<regex>
<name>m5</name>
<expres>$pyFunction:'$doregex[m4]'.replace('\\','')</expres>
<page></page>
</regex>
<regex>
<name>m4</name>
<expres>src":"([^"]+)</expres>
<page>https://embed.cloudycdn.services/player/ltvlive/channel/ymc_ltv09-visiem/</page>
<x-req>XMLHttpRequest</x-req>
<origin>https://embed.cloudycdn.services</origin>
<referer>https://embed.cloudycdn.services/</referer>
<rawpost><![CDATA[referer=https://embed.cloudycdn.services/ltvlive/channel/ymc_ltv09-visiem/?player=regular&protocol=hls]]></rawpost>
</regex>
</item>
 

m5Germany

Active member
Mar 20, 2014
327
105
43
Trying to get this Post stuff clearer in my head. Did some reading/research but none was definitive to me.
Here's the noob question: How would one know when to use <post> or <rawpost>? Can one tell by looking at the Header?
If someone who knows would share the knowledge, it will be appreciated. m5
 

gujal

Developer
Dec 26, 2013
590
326
63
rawpost is when you paste the exact thing you see in Fiddler as in the code above
<rawpost>referer=https://embed.cloudycdn.services/ltvlive/channel/ymc_ltv09-visiem/?player=regular&amp;protocol=hls</rawpost>

post is when you pass ordered pairs for example
<post>key1:value1,key2:value2,key3:value3,.....</post>
As in your case the value is an url, it also has : in it, so it has to be passed using rawpost
 
  • Like
Reactions: m5Germany

undpnd tqucbo

Member
Jan 25, 2021
158
2
18
Can I get help a more site? Tk.
Code:
https://lnk.lt/tiesiogiai#infotv
 
  • Like
Reactions: tungbeng95

m5Germany

Active member
Mar 20, 2014
327
105
43
This has been Tested using Kodi 19.0 w/ LSPro ver:3.0.0~alpha4 on Windows 10 system.
As you should know: the channel is not always active, Geo Blocked for some shows and
some shows are not streamed over the internet.
If value 137748 changes, then small tweak will be needed (it hasn't changed in two days):
LSP3 XML:
<item>
<title>INFO TV HD kanalas internetu</title>
<fanart></fanart>
<thumbnail></thumbnail>
<link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Accept=*/*&amp;Origin=https://lnk.lt&amp;Referer=https://lnk.lt/</link>
<regex>
<name>m5</name>
<expres>videoUrl":"([^"]+)</expres>
<page>https://lnk.lt/api/video/video-config/137748</page>
<connection>keep-alive</connection>
<agent>Mozilla/5.0</agent>
<accept>application/json,text/plain,*/*</accept>
<referer>https://lnk.lt/tiesiogiai</referer>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

BymemoLee

Member
Apr 30, 2018
93
20
8
Can you help me for site?
Code:
https://sporligtv49.live/tv/s-sport-1
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
Try this:

LSP XML:
<item>
<title>S Sport 1</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re, requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('href.+?/([^\'"]+).{10,13}icons/s-sport-1.png',page_data)[0]
  source=requests.get('https://sporligtv42.live/%s'%link,headers={'user-agent':'Mozilla/5.0','referer':'https://sporligtv42.live/','accept':'*/*'},verify=False).text
  url=re.findall('%s.+?framejs../([^\'"]+)'%link,source)[0]
  source=requests.get('https://sporligtv42.live/%s'%url,headers={'user-agent':'Mozilla/5.0','referer':'https://sporligtv42.live/%s'%link,'accept':'*/*'},verify=False).text
  return re.findall('Clappr.Player[\w\W]+?(?:source|src|file):\s*.([^\'"]+)',source)[0]+'|user-agent=ipad&referer='+url
]]></expres>
<page>https://sporligtv42.live/</page>
</regex>
<thumbnail>https://sporligtv42.live/icons/s-sport-1.png</thumbnail>
</item>
 

m5Germany

Active member
Mar 20, 2014
327
105
43
Couple of questions and this "may" be a LSPro ver:3.0.0~alpha4 bug/error.
I have 3 sources. 1st two are "raw" pastebin files and 3rd is Local c: drive.
When I try to add a 4th source - even if I re-use let's say "raw" 2 - I get:

Failed to parse XML Invalid token line 4 etc.

Even though it is the same code that parses fine in 2nd position.
I've made a "Dummie" XML that just has 1 static .m3u8 and still get the error.
So, source 1-3 work as expected - when adding 4th I get the error.
Do I have to enter all the "raw" pastes 1st and then add the Local?
Any ideas? m5
 

m5Germany

Active member
Mar 20, 2014
327
105
43
UPDATE: Hold off on prior request. Going to delete 19.0 then install fresh 19.1.
It might be my system. Need to do more testing. Additionally, have been successful adding 4+ URL sources on my Android box.
Haven't tried the URl / File combo yet.
 

m5Germany

Active member
Mar 20, 2014
327
105
43
I think I need someone to take a look at this and let me know if they are experiencing the same.

OK. After complete Kodi 19.0 uninstall - reboot computer - Install fresh Kodi 19.1 64bit - Turn on third party sources
Install fresh Confluence Skin - Install fresh LSPro ver:3.0.0~alpha4 = Add 5 URL "raw" sources - All work as expected.
Now - Add 1 File source on c: - everything works. Then Add 1 URL "raw" source and even though I can change the name,
when selected - it does not load the new "raw" source but loads the original 1st File source although I have selected
ULR to add not File. Then, delete 1st File source - re-enter LSPro - load the URL "raw" file that was added after 1st -
You would think that the URL "raw" would play but it reverts back to the 1st File even though it was deleted. Then delete the last "raw" source and
add a new one with different URL "raw" and it still plays the original 1st File source.
So everything that is a URL "raw" works until a File is added and then all sources added after that load the File - not URL.
Additionally, I can not add 2 different File sources.
 
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5