LSP Regex & Makelist Discussion.

gladio

New member
Oct 14, 2018
7
0
1

gujal

Developer
Dec 26, 2013
247
45
28
@gladio Looks like they have removed DRM. Try this to check if it works

Code:
<item>
  <title>3FM Radio</title>
  <inputstream>https://nl-ams-p7-am5.cdn.streamgate.nl/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1Njc4Mjc1NjYsInVyaSI6IlwvbGl2ZVwvbnBvXC91XC9ucG9cL2RybVwvZGFzaF9jZW5jXC9ucG8tdnNyLTJcLzBcLzBcLzBcL25wby12c3ItMi5pc21sIiwiY2xpZW50X2lwIjoiMTI1LjIzNy4xNDUuODMifQ.rKnvjyEMfdHn7hUOFbI1G4ZxcHw6Noh_8n-de168ulU/live/npo/u/npo/drm/dash_cenc/npo-vsr-2/0/0/0/npo-vsr-2.isml/stream.mpd|User-Agent=Mozilla/5.0</inputstream>
  <thumbnail>https://over.npo.nl/images/zenders/npo-radio-2.png</thumbnail>
</item>
 

boomski

New member
Mar 23, 2017
15
1
3
Hi is it possible to have a regex for this site
Code:
http://mediabay.tv/tv
 

gujal

Developer
Dec 26, 2013
247
45
28
Enjoy!


Code:
<item>
<title>Mediabay</title>
<link>$doregex[channels]</link>
<thumbnail>http://static.mediabay.com/www_data/newlogos/channels/mediabay1235.218.png</thumbnail>
<fanart>http://static.mediabay.com/www_data/newlogos/channels/mediabay1235.png</fanart>
<regex>
<name>channels</name>
<listrepeat><![CDATA[
<title>[COLOR gold][channels.param1] [COLOR cyan][I][channels.param2][/I][/COLOR]</title>
<link>$doregex[url]</link>
<thumbnail>http://static.mediabay.com[channels.param3]</thumbnail>
<fanart>http://static.mediabay.com[channels.param4]</fanart>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import json
  items = json.loads(page_data)['data']
  channels = []
  for item in items:
    title = item['name'].encode('utf8')
    fanart = item['logo']
    thumb = fanart.replace('.png', '.218.png')
    cid = str(item['id'])
    qual = 'HD' if item['hd'] else 'SD'
    channels.append((title,qual,thumb,fanart,cid))
  return channels
]]></expres>
<page>http://api.mediabay.tv/v2/channels/channels</page>
<referer>http://mediabay.tv/</referer>
</regex>
<regex>
<name>url</name>
<expres>threadAddress":"([^"]+)</expres>
<page>http://api.mediabay.tv/v2/channels/thread/[channels.param5]</page>
<referer>http://mediabay.tv/</referer>
</regex>
</item>
 
  • Like
Reactions: udomrat

JonnyB

New member
Oct 8, 2016
6
0
1
Hi,

@gujal , I was triyng to use your regex of mediabay to catch the json of an iptv player_api but I got an error because ne item don't have the propper ""

Code:
"stream_id": 6192,
"category_id": "4",
The category_id works but the stream_id gives an error, I think its because the 6192 its not "6192", is there some way of catching?

Code:
id = str(item['stream_id'])
Thanks
 

gujal

Developer
Dec 26, 2013
247
45
28
item['stream_id'] will catch the integer value which is then converted to string using str(item['stream_id']) for use in the makelist.
If it is not working for you PM me the code you have so far and I will take a look at it
 
  • Like
Reactions: JonnyB

turko03

Member
Mar 27, 2018
40
0
6
can you help this iste thanks in advance
hxxp://tv.canlitribun4.com/kanal/4
 

makal

Member
Jul 23, 2014
53
7
8
try this
Code:
<item>
<title>canlitribun4</title>
<link>$doregex[m3u8]|User-Agent=iPad&amp;Referer=https://www.futbolcafe21.xyz/</link>
<regex>
<name>m3u8</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('source: "(.*?)"',page_data)[0]
]]></expres>
<page>https://www.futbolcafe21.xyz/izle/bein1.php</page>
<referer>http://tv.canlitribun4.com/kanal/4</referer>
</regex>
</item>
 
  • Like
Reactions: turko03

udomrat

New member
Nov 10, 2016
11
3
3
Code:
<item>
<title>tennis-channel</title>
<link>$doregex[m3u8]|User-Agent=iPad&amp;Referer=http://ustvgo.tv/</link>
<regex>
<name>m3u8</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall("file: '(.*?)'",page_data)[0]
]]></expres>
<page>http://ustvgo.tv/tennis-channel-live-free/</page>
<referer>http://ustvgo.tv/</referer>
</regex>
</item>
 
  • Like
Reactions: Download

boomski

New member
Mar 23, 2017
15
1
3
Hi is it possible to have a regex for this
Code:
http://www.chch.com/live/
 

gujal

Developer
Dec 26, 2013
247
45
28
Enjoy!

Code:
<item>
<title>CHCH</title>
<link>$doregex[url]</link>
<thumbnail>https://www.chch.com/wp-content/uploads/2018/11/CHCH_CMYK_Neg_logo.png</thumbnail>
<regex>
<name>url</name>
<expres>src:\s*'(http[^']+)</expres>
<page>https://chch.cdn.clearcable.net/</page>
<referer>http://www.chch.com/</referer>
</regex>
</item>
 
  • Like
Reactions: boomski

jamers

New member
Jun 29, 2018
17
0
1
I need help for this :
thanks

hxxp://www.tvsportvdez.com/cmtv-online-gratis/
 

gujal

Developer
Dec 26, 2013
247
45
28
Enjoy!

Code:
<item>
<title>CMTV</title>
<link>$doregex[url]</link>
<thumbnail></thumbnail>
<regex>
<name>url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1',
            'Referer': 'https://www.ucaster.xyz/',
            'Origin': 'https://www.ucaster.xyz'}
  lb1, lb2 = re.findall(r'url:\s*"([^"]+)"\s*\+\s*(\d+)', page_data)[0]
  lburl = lb1 + lb2
  htm = requests.get(lburl, headers=headers).text
  ea = re.findall('redirect=(.*)', htm)[0]
  p1, p2 = re.findall(r'hlsUrl\s*=\s*"([^"]+)".+?"([^"]+)', page_data)[0]
  p3 = re.findall(r'enableVideo\("([^"]+)', page_data)[0]
  url = p1 + ea + p2 + p3[:32] + p3[33:]
  return url
]]></expres>
<page>https://www.ucaster.xyz/hembedplayer/cmtvdasogra/1/720/450</page>
<referer>http://tvdesporto.live/</referer>
</regex>
</item>
 

cris_manya

Member
Nov 20, 2016
30
0
6
Hi all,
someone can help me with this :

Code:
hxxp://cablegratis.online/space-en-vivo/
Thanks in advance
 

gujal

Developer
Dec 26, 2013
247
45
28
It is there in the page source code in the clear for almost all channels
Code:
var space = "http://iptv.wtf:80/live/arqxoxjd/ba6626FuzH/11317.m3u8"
 
  • Like
Reactions: cris_manya

myosmc

Member
May 18, 2018
48
0
6
Friends, the makelist is this one that had previously posted streamwatcher as soon as the url is changed but the same doesn't run for me here:
Code:
https://pastebin.com/raw/3Z8K3NhT
 

jamers

New member
Jun 29, 2018
17
0
1
gujal, something went wrong with your code,because is not working anymore,
can you help me ?
Thanks

<item>
<title>CMTV</title>
<link>$doregex</link> <thumbnail></thumbnail> <regex> <name>url</name> <expres><![CDATA[#$pyFunction def GetLSProData(page_data,Cookie_Jar,m): import re, requests headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1', 'Referer': 'https://www.ucaster.xyz/', 'Origin': 'https://www.ucaster.xyz'} lb1, lb2 = re.findall(r'url:\s*"([^"]+)"\s*\+\s*(\d+)', page_data)[0] lburl = lb1 + lb2 htm = requests.get(lburl, headers=headers).text ea = re.findall('redirect=(.*)', htm)[0] p1, p2 = re.findall(r'hlsUrl\s*=\s*"([^"]+)".+?"([^"]+)', page_data)[0] p3 = re.findall(r'enableVideo\("([^"]+)', page_data)[0] url = p1 + ea + p2 + p3[:32] + p3[33:] return url ]]></expres> <page>https://www.ucaster.xyz/hembedplayer/cmtvdasogra/1/720/450</page> <referer>http://tvdesporto.live/</referer> </regex> </item>
 

goldonx

New member
Mar 30, 2015
8
6
3
You need to a small fix replace
Code:
url = p1 + ea + p2 + p3[:32] + p3[33:]
with
Code:
url = p1 + ea + p2 + p3[:44] + p3[45:]
Code:
<item>
<title>CMTV</title>
<link>$doregex[url]</link>
<thumbnail></thumbnail>
<regex>
<name>url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1',
            'Referer': 'https://www.ucaster.xyz/',
            'Origin': 'https://www.ucaster.xyz'}
  lb1, lb2 = re.findall(r'url:\s*"([^"]+)"\s*\+\s*(\d+)', page_data)[0]
  lburl = lb1 + lb2
  htm = requests.get(lburl, headers=headers, verify=False).text
  ea = re.findall('redirect=(.*)', htm)[0]
  p1, p2 = re.findall(r'hlsUrl\s*=\s*"([^"]+)".+?"([^"]+)', page_data)[0]
  p3 = re.findall(r'enableVideo\("([^"]+)', page_data)[0]
  url = p1 + ea + p2 + p3[:44] + p3[45:]
  return url
]]></expres>
<page>https://www.ucaster.xyz/hembedplayer/cmtvdasogra/1/720/450</page>
<referer>http://tvdesporto.live/</referer>
</regex>
</item>
 

jamers

New member
Jun 29, 2018
17
0
1
Thanks goldonx !!
 

gujal

Developer
Dec 26, 2013
247
45
28
Use it this way so that they dont see Kodi User agent. May be they changed because of it
Code:
<item>
<title>CMTV</title>
<link>$doregex[url]</link>
<thumbnail></thumbnail>
<regex>
<name>url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests, urllib
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1',
             'Referer': 'https://www.ucaster.xyz/',
             'Origin': 'https://www.ucaster.xyz'}
  lb1, lb2 = re.findall(r'url:\s*"([^"]+)"\s*\+\s*(\d+)', page_data)[0]
  lburl = lb1 + lb2
  htm = requests.get(lburl, headers=headers).text
  ea = re.findall('redirect=(.*)', htm)[0]
  p1, p2 = re.findall(r'hlsUrl\s*=\s*"([^"]+)".+?"([^"]+)', page_data)[0]
  p3 = re.findall(r'enableVideo\("([^"]+)', page_data)[0]
  url = p1 + ea + p2 + p3[:44] + p3[45:] + '|' + urllib.urlencode(headers)
  return url
]]></expres>
<page>https://www.ucaster.xyz/hembedplayer/cmtvdasogra/1/720/450</page>
<referer>http://tvdesporto.live/</referer>
</regex>
</item>
 

jamers

New member
Jun 29, 2018
17
0
1
Thanks gujal and goldonx for your hard work, but unfortunately is not working again,in my opinion
the owner of the site is looking us here.
 

goldonx

New member
Mar 30, 2015
8
6
3
Replace
Code:
url = p1 + ea + p2 + p3[:44] + p3[45:] + '|' + urllib.urlencode(headers)
with
Code:
url = p1 + ea + p2 + p3[:15] + p3[16:] + '|' + urllib.urlencode(headers)
 
  • Like
Reactions: jamers

gujal

Developer
Dec 26, 2013
247
45
28
@jamers
I think they change the value everyday. Here is the code to handle that. try for a couple of days
Code:
<item>
<title>CMTV</title>
<link>$doregex[url]</link>
<thumbnail></thumbnail>
<regex>
<name>url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests, urllib
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1',
             'Referer': 'https://www.ucaster.xyz/',
             'Origin': 'https://www.ucaster.xyz'}
  lb1, lb2 = re.findall(r'url:\s*"([^"]+)"\s*\+\s*(\d+)', page_data)[0]
  jsurl = re.findall(r"type='text[^=]+='(h[^']+)", page_data)[0]
  htm = requests.get(jsurl, headers=headers).text
  sval = int(re.findall('string\(0,\s*(\d+)', htm)[0])
  htm = requests.get(lb1+lb2, headers=headers).text
  ea = re.findall('redirect=(.*)', htm)[0]
  p1, p2 = re.findall(r'hlsUrl\s*=\s*"([^"]+)".+?"([^"]+)', page_data)[0]
  p3 = re.findall(r'enableVideo\("([^"]+)', page_data)[0]
  url = p1 + ea + p2 + p3[:sval] + p3[sval+1:] + '|' + urllib.urlencode(headers)
  return url
]]></expres>
<page>https://www.ucaster.xyz/hembedplayer/cmtvdasogra/1/720/450</page>
<referer>http://tvdesporto.live/</referer>
</regex>
</item>
 
  • Like
Reactions: jamers

Download

New member
Jun 16, 2016
4
0
1
Japan
Hello. Is it possible to have a regex for this site. I tried it and it didn't work.
Code:
https://www.ball24.tv/allchannel/?id=golfchannel
Code:
<item>
<title>Golf</title>
<link>$doregex[get-m3u8]|referer=https://www.ball24.tv/</link>
<regex>
<name>get-m3u8</name>
<expres>file:."(.*?)"</expres>
<page>https://www.ball24.tv/allchannel/?id=golfchannel</page>
<agent>Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36</agent>
<referer>https://www.ball24.tv/</referer>
<cookieJar></cookieJar>
</regex>
<thumbnail>https://www.ball24.tv/wp-content/themes/ball24/logo/golfchannel.png</thumbnail>
</item>
 

Chaos-t

New member
Jul 9, 2016
9
0
1
Can someone help me to regex this, please?

hxxps://www.canlitvizle.com/trt-1

Thanks in advance.
 

gujal

Developer
Dec 26, 2013
247
45
28
Enjoy!

Code:
<item>
  <title>TRT 1</title>
  <link>$doregex[url]|User-Agent=iPad</link>
  <thumbnail></thumbnail>
  <regex>
    <name>url</name>
    <expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re
  pv1, p2, pv3 = re.findall("file:\s*''\+([^+]+)\+'([^']+)'\+([^+]+)",page_data)[0]
  p1,p3 = re.findall("{}\s*=\s*'([^']+)';{}\s*=\s*'([^']+)".format(pv1,pv3),page_data)[0]
  return p1+p2+p3
]]></expres>
    <page>https://canlitvizle.com/yayinim.php?kanal=trt-1</page>
    <referer>https://canlitvizle.com/</referer>
  </regex>
</item>
 
  • Like
Reactions: Chaos-t