LSP Regex & Makelist Discussion.

papaya

Member
Apr 4, 2018
42
1
8
hi guys.

anyone can help with this site. got great source of movie

Code:
https://www.hitmovie.ir/
Thank you in advance
 

streamwatcher2013

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

LSP XML:
<item>
<title>https://www.hitmovie.ir/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2][/COLOR]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  data=re.findall('(?s)class="entry-main-inner".+?href="(.*?)">([^<]+).+?data-lazy-srcset="([^\s]+)',page_data)
  for pn in xrange(2,10):
    source=requests.get('https://www.hitmovie.ir/page/'+str(pn)+'/',headers={'user-agent':'ipad','referer':'https://www.hitmovie.ir/','accept':'*/*'}).content.replace('#038;','').replace('&#8211;','-').replace('&#8217;','\'')
    data +=re.findall('(?s)class="entry-main-inner".+?href="(.*?)">([^<]+).+?data-lazy-srcset="([^\s]+)',source)
  return data
]]></expres>
<page>https://www.hitmovie.ir/</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist2.param1][/COLOR]</title>
  <link>[makelist2.param2]</link>
  <thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 return re.findall('class="fa\s*fa.+?i>([^<]+).+?href="([^"]+)',re.findall('class="dl_track">(?s)(.*?)</ul',page_data)[0])
]]></expres>
<page>[makelist.param1]</page>
<referer>https://www.hitmovie.ir/</referer>
</regex>
</item>
 

MaxSpeed

New member
Nov 3, 2019
17
0
1
Regex for Dailymotion:

<item>
<title>Dailymotion</title>
<link>$doregex[start]|Cookie=$get_cookies$</link>
<regex>
<name>start</name>
<expres>(http.*)\#</expres>
<page>$doregex&amp;redirect=0</page> <referer>http://www.dailymotion.com/</referer> <cookieJar></cookieJar> </regex> <regex> <name>url</name> <expres>$pyFunction:'$doregex[jsonurl]'.replace('\/','/')</expres> <page></page> </regex> <regex> <name>jsonurl</name> <expres>x-mpegURL","url":"(.*?)"</expres> <page>https://www.dailymotion.com/embed/video/x5oqtkc </page> <cookieJar></cookieJar> </regex> <thumbnail></thumbnail> </item> In case anyone is interested for example from this link we use what is after the video /x5qtkc hxxps://www.dailymotion.com/video/x5oqtkc?playlist=x5sf4t
 

vbprofi

Member
Feb 9, 2016
77
3
8
Hello dear friends,
does anyone have any idea why this code doesn't play the streams? The Items are listed, but cannot play the streams.
best regards and thank you in advance!
Code:
<item>
<title>[COLOR cyan]JIN TV[/COLOR]</title>
<link>$doregex[makelist]</link>

<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR cyan] [makelist.param2] [/COLOR]</title>
<link>$doregex[play]|referer=http://jintv.net[makelist.param1]</link>
<thumbnail>n/a</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
    return re.findall('(?s)thumb.*?href="(/de/.*?)".*?"img.*?class="name_or_title">(.*?)</span>', page_data)
]]></expres>
<page>http://jintv.net/de/program/</page>
<cookieJar></cookieJar>
</regex>

<regex>
<name>play</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
    return re.findall('src="(.*?\.MP4.*?)"', page_data)[0] #'|type="video/mp4"'
]]></expres>
<page>http://jintv.net[makelist.param1]</page>
<referer>http://jintv.net/de/program/</referer>
<cookieJar></cookieJar>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0</agent>
</regex>
</item>
 

vbprofi

Member
Feb 9, 2016
77
3
8
thanks for the quick help. The solution worked. I had overlooked &amp;...
Stay healthy and best regards!
Übersetzung teilen
 

MaxSpeed

New member
Nov 3, 2019
17
0
1
Hello friends.
Could someone help me with a regex for gamovideo, please?
I would like to be able to see some movies in kodi since I cannot go out on the street through the covid-19 and so it becomes more enjoyable
Thank you!!!
 

gujal

Developer
Dec 26, 2013
539
296
63
Just use <urlsolve>gamovideo-embed</urlsolve> instead of <link>gamovideo-embed</link> and it will work if you have ResolveURL 5.0.41 installed
 

MaxSpeed

New member
Nov 3, 2019
17
0
1
Thank you.
One question: how do I get the embed link?
I have tried and I cannot see a link from gamovieo, excuse my pathetic knowledge on the subject.
 

gujal

Developer
Dec 26, 2013
539
296
63
Like this way
LSP XML:
<item>
  <title>Gamovideo</title>
  <urlsolve>http://gamovideo.com/59t26k8xv4tr</urlsolve>
</item>
 
  • Like
Reactions: MaxSpeed

tobotminer

Member
Jan 26, 2018
49
4
8
Hello friend,

possible to get this regex. there is no korean based addon out there. i like to watch them on

Code:
https://verdrama.com/korean
 

streamwatcher2013

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

LSP XML:
<item>
<title>https://verdrama.com/korean</title>
<link>$doregex[makelist]</link>
<thumbnail></thumbnail>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param3]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  count=3;pn=1;data=[]
  while pn <= int(count):
    page='https://verdrama.com/korean?page='+str(pn);source=requests.get(page,headers={'user-agent':'ipad','referer':'https://verdrama.com/korean','accept':'*/*'}).content
    data +=re.findall('<img\s*src="(h[^"]+).+?href="(.*?)"\s*title="([^"]+)',re.findall('id="page-content">(?s)(.*?)(?:<nav|pagi)',source)[0]);pn +=1
  return data
]]></expres>
<page>https://verdrama.com/korean</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[makelist2.param2]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('episode-id.+?href="([^"]+).+?episode-only">([^<]+)',re.findall('id="slim-episodes">(?s)(.*?)<h1\s*class="movie-title',page_data)[0])
]]></expres>
<page>[makelist.param2]</page>
<referer>https://verdrama.com/korean</referer>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):
  url=re.findall('id="movie-data.+?src="([^"]+)',page_data)[0];url='https:'+url if url.startswith('//') else url
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'https://verdrama.com/korean','accept':'*/*'}).content
  decoded=jsunpack.unpack(re.findall('(eval.+?);</',source)[0]).replace('\\','')
  urltok=re.findall('url:\s*[\'"](\w[^\'"]+)',decoded)[-1]
  link='https://video.verdrama.com/player?url=%s'%urltok
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':url,'x-requested-with':'XMLHttpRequest','accept':'*/*'}).content
  ghtml=re.findall('id=.player[\w\W]*?src="([^"]+)',source)[0];html=ghtml.split('/?')[-1]
  fUrl=html.replace('play.php','ajax.php')+'&refer=none'
  source=requests.get(fUrl,headers={'user-agent':'Mozilla/5.0','referer':html,'x-requested-with':'XMLHttpRequest','accept':'*/*'}).content.replace('\\','')
  return re.findall('file[\'"]:[\'"]([^\'"]+)',source)[-1]+'|user-agent=ipad&referer='+fUrl
]]></expres>
<page>[makelist2.param1]</page>
<referer>[makelist.param2]</referer>
</regex>
<thumbnail>https://verdrama.com/themes/default/assets/dist/img/logo.png</thumbnail>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
414
63
USA
Or add additional line to impost jsunpack from resolveUrl or Urlresolver

import re
from urlresolver.plugins.lib import jsunpack # If you have urlresolver
#from resolveurl.plugins.lib import jsunpack # If you have resoleUrl
def GetLSProData(page_data,Cookie_Jar,m):
 

m5Germany

Active member
Mar 20, 2014
230
72
28
Hope all is well. I am trying to RegEx the following:
Sample CODE:
<div id="cambyregion4" class="row" style="position:relative;"><ul class="list-group"><li class="list-group-item"><div class="row"><div class="col-md-6"><a href="#" onClick="jaascript:createWindow(\'/video/video.php?feed=1701ea3700f9004a005dd336c4235c0a\');">I-695 AT BALT NATL PK</a></div><div class="col-md-6"><a href="#" onClick="javascript:createWindow(\'/video/video.php?feed=ac00e19000770012005cd336c4235c0a\');">I-695 AT BALTIMORE WASHINGTON PKWY</a>
<div id="cambyregion5" class="row" style="position:relative;"><ul class="list-group"><li class="list-group-item"><div class="row"><div class="col-md-6"><a href="#" onClick="jaascript:createWindow(\'/video/video.php?feed=1701ea3700f9004a005dd336c4235c0b\');">I-695 AT BALT NATL PK (B)</a>
I have this: cambyregion4.*?createWindow.*?feed=([^\\]+).{6}([^<]+) I would like to capture both of the "cambyregion4" feeds only. The page has 100+ feeds for that category (I've only included 2 feeds) and 1 feed for "cambyregion5" . I do not want/need to include the "cambyregion5" feed(s). If I use feed=([^\\]+).{6}([^<]+) it captures all the "feeds" for both categories - not what I am looking for.

Any ideas? I thought I might be able to use (?s) - but unsuccesful.

As Always, Thanks in advance.
m5
 

gujal

Developer
Dec 26, 2013
539
296
63
If using regex you may have to do twice
First to capture the complete "cambyregion4" div
Second capture to get the individual video feeds inside the first capture

Other option is to use BeautifulSoup which makes thing easier
Python:
from BeautifulSoup import BeautifulSoup, SoupStrainer
clink = SoupStrainer('div', {'id': 'cambyregion4'})
cdiv = BeautifulSoup(page_data, parseOnlyThese=mlink)
items = cdiv.findAll('div', {'class': 'col-md-6'})
cams = [(i.find('a').get('onClick').split('=')[-1].split('\\')[0], i.text) for i in items]
return cams
 

gujal

Developer
Dec 26, 2013
539
296
63
There is a typo above. the line should be
Python:
cdiv = BeautifulSoup(page_data, parseOnlyThese=clink)
 

BymemoLee

Member
Apr 30, 2018
90
18
8
Hello
Can you help,
broadcast does not work ?
Code:
<item>
<title>Moviesmart Türk</title>
<link>$doregex[url]</link>
<regex>
<name>url</name
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('source:\s*[\'"]([^\'"]+)',requests.get('https://7.fixspor45.xyz/izle/mturk.php').text)[0]
]]></expres>
<page></page>
</regex>
</item>
 

BymemoLee

Member
Apr 30, 2018
90
18
8
XML:
<item>
<title>Moviesmart Türk</title>
<link>$doregex[url]</link>
<regex>
<name>url</name
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('source:\s*[\'"]([^\'"]+)',requests.get('https://7.fixspor45.xyz/izle/mturk.php').text)[0]
]]></expres>
<page></page>
</regex>
</item>
@streamwatcher2013 Teacher,

you don't have a solution.
 

gujal

Developer
Dec 26, 2013
539
296
63
Just change this line <link>$doregex[url]</link> to this
XML:
<link>$doregex[url]|Referer=https://7.fixspor45.xyz</link>
 

gujal

Developer
Dec 26, 2013
539
296
63
Enjoy!

XML:
<item>
<title>NatGeo Wild Türk</title>
<inputstream>$doregex[url]|Referer=https://7.fixspor45.xyz</inputstream>
<regex>
<name>url</name>
<expres>source:\s*['"]([^'"]+)</expres>
<page>https://7.fixspor45.xyz/izle/nwild.php</page>
</regex>
</item>
 
  • Like
Reactions: altug

m5Germany

Active member
Mar 20, 2014
230
72
28
Try this - works for me - Enjoy.
LSP XML:
<item>
<title>Moviesmart Türk - Python</title>
<inputstream>$doregex[url]|User-Agent=Mozilla/5.0&amp;Referer=https://7.fixspor45.xyz/izle/mturk.php</inputstream>
<regex>
<name>url</name
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('source:\s"([^"]+)',requests.get('https://7.fixspor45.xyz/izle/mturk.php').text)[0]
]]></expres>
<page></page>
</regex>
</item>

<item>
<title>NatGeo Wild Türk - Python</title>
<inputstream>$doregex[url]|User-Agent=Mozilla/5.0&amp;Referer=https://7.fixspor45.xyz/izle/nwild.php</inputstream>
<regex>
<name>url</name
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('source:\s"([^"]+)',requests.get('https://7.fixspor45.xyz/izle/nwild.php').text)[0]
]]></expres>
<page></page>
</regex>
</item>

<item>
<title>NatGeo Wild Türk - RegEx</title>
<inputstream>$doregex[url]|User-Agent=Mozilla/5.0&amp;Referer=https://7.fixspor45.xyz/izle/nwild.php</inputstream>
<regex>
<name>url</name>
<expres>source:\s"([^"]+)</expres>
<page>https://7.fixspor45.xyz/izle/nwild.php</page>
</regex>
</item>
m5
 

gujal

Developer
Dec 26, 2013
539
296
63
For <inputstream> tag to work in LSP, the following conditions have to be met
1. Kodi 17.6 or above
2. Inputstream Adaptive Addon should be enabled. On a default install it is disabled
2. LSP 2.8.3 or above

One the above conditions are met, it will work
 
  • Like
Reactions: BymemoLee

DarkSky

Member
Apr 1, 2016
42
0
6
can someone create regex for this channel
please only regex dont makelist

Code:
https://www.canlitv.mobi/a-spor-izle
 

streamwatcher2013

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

LSP XML:
<item>
<title>A Spor</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,unwise
def GetLSProData(page_data,Cookie_Jar,m):
  link=re.findall('"player"[\w\W]*?src=[\'"]([^\'"]+)',page_data)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://www.canlitv.mobi/a-spor-izle','accept':'*/*'},cookies=Cookie_Jar).content
  if 'eval' in source:
    wised=unwise.unwise_process(re.findall('(eval.+?);</',source)[0])
    html,tok=re.findall('111.+?[\'"](.*?)[\'"].+?222.+?[\'"]([^\'"]+)',wised)[0]
    return html+'aspor.m3u8'+tok+'|user-agent=ipad&referer='+link
  elif 'eval' not in source:
    html=re.findall('111.+?[\'"]([^\'"]+)',source)[-1]
    tok=re.findall('222.+?[\'"]([^\'"]+)',source)[-1]
    return html+'aspor.m3u8'+tok+'|user-agent=ipad&referer='+link
]]></expres>
<page>https://www.canlitv.mobi/a-spor-izle</page>
<referer>https://www.canlitv.mobi/</referer>
</regex>
<thumbnail>https://www.canlitv.mobi/kanallar/a-spor-1.png</thumbnail>
</item>
 
  • Like
Reactions: DarkSky and altug

Doom

Member
Sep 16, 2019
292
21
18
Hi can i get help for all 3 season here & thanks!
 
Last edited by a moderator:

Doom

Member
Sep 16, 2019
292
21
18
Here's another site for the same series can someone help me out & thanks
 
Last edited by a moderator:

Million

New member
Dec 9, 2018
24
1
3
Can you help me to regex this:
#makelist
XML:
https://www.dailymotion.com/DW_Deutsch/videos
Thanks
 

gujal

Developer
Dec 26, 2013
539
296
63
Will list the latest 100 videos, Enjoy!

XML:
<item>
  <title>DW-Deutsch</title>
  <link>$doregex[makelist]</link>
  <regex>
    <name>makelist</name>
    <listrepeat><![CDATA[
      <title>[makelist.param1]</title>
      <dm>[makelist.param3]</dm>
      <thumbnail>[makelist.param2]</thumbnail>
    ]]></listrepeat>
    <expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import json
  js_data = json.loads(page_data).get('list')
  items = [(item.get('title'), item.get('thumbnail_large_url'), item.get('id')) for item in js_data]
  return items
    ]]></expres>
    <page>https://api.dailymotion.com/videos?fields=id,thumbnail_large_url,title&amp;owner=DW_Deutsch&amp;sort=recent&amp;limit=100</page>
</item>
 
  • Like
Reactions: Million

Nature

New member
Dec 12, 2018
19
0
1
I need to fix this code
& if you can make also a code for Search
Thanks
XML:
<item>
<title>Kino</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2][/COLOR] ([makelist.param3])</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param4]</thumbnail>
  <info>[makelist.param5]</info>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,xbmc,xbmcgui,xbmcaddon,time
def GetLSProData(page_data, Cookie_Jar,m,itxt='Enter Movie Name:'):
  addon = xbmcaddon.Addon('plugin.video.live.streamspro')
  addon_version = addon.getAddonInfo('version')
  profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
  solver = InputWindow(txt=itxt);solution= solver.get()
  inf=re.findall('(?s)<form.method="post".+?value="(.*?)".+?value="(.*?)".+?value="(\d+)"',page_data)[0]
  data={'do':inf[0],'subaction':inf[1],'titleonly':inf[2],'story':solution,'x':'4','y':'13','submit':'submit'}
  source=requests.post('http://kinoger.com/',headers={'Referer':'http://kinoger.com/','User-Agent':'Mozilla/5.0'},data=data).text
  list=re.findall('</table.*\n.*/form(?s)(.*?)"navigation"',source)[0]
  return re.findall('(?s)<img src.+?href="(h.*?)">(.*?)\s\((\d+).+?src="(.*?)".+?</b>([^<]+)',list)
class InputWindow(xbmcgui.WindowDialog):
    def __init__(self, *args, **kwargs):
        self.txt = kwargs.get('txt','')
        xbmcgui.WindowXMLDialog.__init__(self)
        #self.addControl(self.txt)
        path = xbmcaddon.Addon().getAddonInfo('path')
        self.kbd = xbmc.Keyboard()
        self.kbd.setHeading( self.txt)
    def get(self):
        self.show()
        time.sleep(2)
        self.kbd.doModal()
        if (self.kbd.isConfirmed()):
            text = self.kbd.getText()
            self.close()
            return text
        self.close()
        return False
]]></expres>
<page>http://kinoger.com/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  source=requests.get(re.findall('id="kinog-player"[\w\W]*?"(h[^"]+)',page_data)[0],headers={'referer':'[makelist.param1]','user-agent':'Mozilla/5.0','accept':'*/*'}).text
  inf=re.findall('src="//((.+?)video[^"]+)',source)[0];url='http://%s'%inf[0]
  source=requests.get(url,headers={'Referer':'[makelist.param1]','User-Agent':'Mozilla/5.0','Accept':'*/*'}).text
  html='http://'+re.findall('media.+?[\'"]//([^\'"]+)',source)[0]
  return requests.get(html,headers={'user-agent':'Mozilla/5.0','referer':'http://%s'%inf[1],'accept':'*/*'}).url+'|user-agent=ipad&referer=http://%s'%inf[1]
]]></expres>
<page>[makelist.param1]</page>
<referer>http://kinoger.com/</referer>
</regex>
</item>
 

m5Germany

Active member
Mar 20, 2014
230
72
28
Greetings. Wrote this today. RegEx not Python.
<item>
<title>04082020 [COLOR=FF00FFFF]USA |[COLOR=FF00FF00] ustvgo.tv - Main Menu[/COLOR] | SEWN[/COLOR]</title>
<link>$doregex[makelist]</link>
<thumbnail>https://images-na.ssl-images-amazon.com/images/I/51RZSum5msL.png</thumbnail>
<fanart>https://s-media-cache-ak0.pinimg.com/originals/37/31/ba/3731ba2dfa91ea1527f1c0044e3aae89.gif</fanart>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR=FF00FFFF]USA |[COLOR=FF00FF00] [makelist.param2] ([COLOR=FF00CCFF]SD[/COLOR])[/COLOR] | SEWN[/COLOR]</title>
<link>$doregex[getServer]$doregex[getWMSauth1]$doregex[getWMSauth2]|User-Agent=Mozilla/5.0&amp;Referer=https://ustvgo.tv/</link>
<thumbnail>https://images-na.ssl-images-amazon.com/images/I/51RZSum5msL.png</thumbnail>
<fanart>https://s-media-cache-ak0.pinimg.com/originals/37/31/ba/3731ba2dfa91ea1527f1c0044e3aae89.gif</fanart>
]]></listrepeat>
<expres><![CDATA[strong.{9}"([^"]+)..([^<]+)]]></expres>
<page>https://ustvgo.tv</page>
</regex>
<regex>
<name>getPHP</name>
<expres>i.{6}src.{21}([^']+)</expres>
<page>[makelist.param1]</page>
</regex>
<regex>
<name>getWMSauth1</name>
<expres>$pyFunction:'$doregex[getRawWMSauth1]'.replace('"','').replace(',','')</expres>
<page></page>
</regex>
<regex>
<name>getRawWMSauth1</name>
<expres>$doregex[getPreWMSauth1].{4}([^\]]+)</expres>
<page>https://ustvgo.tv/player.php?stream=$doregex[getPHP]</page>
</regex>
<regex>
<name>getPreWMSauth1</name>
<expres><![CDATA[join.{7}(.*?).join]]></expres>
<page>https://ustvgo.tv/player.php?stream=$doregex[getPHP]</page>
</regex>
<regex>
<name>getWMSauth2</name>
<expres>$doregex[getPreWMSauth2].([^<]+)</expres>
<page>https://ustvgo.tv/player.php?stream=$doregex[getPHP]</page>
</regex>
<regex>
<name>getPreWMSauth2</name>
<expres><![CDATA[ById..([^"]+)]]></expres>
<page>https://ustvgo.tv/player.php?stream=$doregex[getPHP]</page>
</regex>
<regex>
<name>getServer</name>
<expres>$pyFunction:'$doregex[getPreServer]'.replace('\/','/').replace('"','').replace(',','')</expres>
<page>https://ustvgo.tv/player.php?stream=$doregex[getPHP]</page>
</regex>
<regex>
<name>getPreServer</name>
<expres><![CDATA[return..([^\]]+)..join]]></expres>
<page>https://ustvgo.tv/player.php?stream=$doregex[getPHP]</page>
</regex>
<item>
Although I can not write Python - (Kinda read only) If possible, would a member take a look/write Python code?

As Always, Thanks in advance.
m5
 

gujal

Developer
Dec 26, 2013
539
296
63
Enjoy!
XML:
<item>
<title>04082020 [COLOR=FF00FFFF]USA |[COLOR=FF00FF00] ustvgo.tv - Main Menu[/COLOR] | SEWN[/COLOR]</title>
<link>$doregex[makelist]</link>
<thumbnail>https://images-na.ssl-images-amazon.com/images/I/51RZSum5msL.png</thumbnail>
<fanart>https://s-media-cache-ak0.pinimg.com/originals/37/31/ba/3731ba2dfa91ea1527f1c0044e3aae89.gif</fanart>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR=FF00FFFF]USA |[COLOR=FF00FF00] [makelist.param2] ([COLOR=FF00CCFF]SD[/COLOR])[/COLOR] | SEWN[/COLOR]</title>
<link>$doregex[getUrl]|User-Agent=iPad&amp;Referer=https://ustvgo.tv/</link>
<thumbnail>https://images-na.ssl-images-amazon.com/images/I/51RZSum5msL.png</thumbnail>
<fanart>https://s-media-cache-ak0.pinimg.com/originals/37/31/ba/3731ba2dfa91ea1527f1c0044e3aae89.gif</fanart>
]]></listrepeat>
<expres><![CDATA[<strong.+?"([^"]+)">([^<]+)]]></expres>
<page>https://ustvgo.tv</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re
  part1, par2, par3 = re.findall('return.+?"([^\]]+).+?\+\s*([^.]+).+?\+[^"]+"([^"]+)', page_data)[0]
  part2 = re.findall('var\s*{0}\s*=\s*\["([^]]+)'.format(par2), page_data)[0].replace('","','')[:-1]
  part3 = re.findall('id={0}>([^<]+)'.format(par3), page_data)[0]
  return part1[:-1].replace('","','').replace('\\','') + part2 + part3
]]></expres>
<page>https://ustvgo.tv$doregex[getPHP]</page>
<referer>https://ustvgo.tv/</referer>
</regex>
<regex>
<name>getPHP</name>
<expres>iframe\s*src='([^']+)</expres>
<page>[makelist.param1]</page>
</regex>
</item>
 

altug

Member
Jul 7, 2016
70
2
8
<item>
<title>Bein Sports Haber</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<thumbnail>https://skystar-2.com/video/images/beinsportshaber-logo.png</thumbnail>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
import re
strurl = re.findall('atob\("([^"]+)', page_data)[0].decode('base64')
strurl = 'http' + strurl.split('http')[-1]
return strurl
]]></expres>
<page>https://skystar-2.com/video/beinsportshaber.php</page>
<referer>https://skystar-2.com/live-tv.htm</referer>
</regex>
</item>
unfortunately it doesn't work
 

Doom

Member
Sep 16, 2019
292
21
18
Can i get help here... be safe & thanks!
 

streamwatcher2013

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

LSP XML:
<item>
<title>https://optimovision.tv/novelas-completas</title>
<link>$doregex[makelist]</link>
<thumbnail>https://optimovision.tv/images/logo/logo.png</thumbnail>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param3]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>https://optimovision.tv/[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  count=re.findall('(\d+)</a></li><li\s*class',page_data)[0];pn=1;data=[]
  while pn <= int(count):
    pages='https://optimovision.tv/novelas-completas/?page='+str(pn)
    source=requests.get(pages,headers={'user-agent':'Mozilla/5.0','referer':'https://optimovision.tv/novelas-completas'}).content
    data +=re.findall('(?s)href="/([^"]+).+?src="/(.*?)"\s*title="([^"]+)',re.findall('id="list_videos">(?s)(.*?)pagination',source)[0]);pn +=1
  return data
]]></expres>
<page>https://optimovision.tv/novelas-completas</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[makelist2.param3]</title>
  <link>$doregex[getUrl]|user-agent=ipad&amp;referer=https://optimovision.tv/[makelist2.param1]</link>
  <thumbnail>[makelist2.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('class="">\s*<a\s*href="/([^"]+).+?src="(.*?)"\s*title="([^"]+)',re.findall('id="list_videos"(?s)(.*?)footer-container',page_data)[0])
]]></expres>
<page>https://optimovision.tv/[makelist.param1]</page>
<referer>https://optimovision.tv/novelas-completas</referer>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[<video.+?src="([^"]+)]]></expres>
<page>https://optimovision.tv/[makelist2.param1]</page>
<referer>https://optimovision.tv/[makelist.param1]</referer>
</regex>
</item>
 
  • Like
Reactions: Doom

Doom

Member
Sep 16, 2019
292
21
18
@streamwatcher2013 like always appreciate the help... sorry to bother some are missing could you help me with this site if it's not much to ask again.
 
Last edited by a moderator:

m5Germany

Active member
Mar 20, 2014
230
72
28
Greetings - Is it possible to CODE this? I've tried but have not had success.

Links 2nd-4th have dynamic characters when loaded.
Link Start is referer and where I started looking at this challenge.
Link 2nd I can not see from Link Start

Additionally, I do not know how to retrieve a link that might be in Header using RegEx and I am not proficient with Python.

Info:
(Original Page: https://www.fox.com/  then Live then FOX News Channel)
Start  https://www.fox.com/live/channel/fnc/?id=328726054631
2nd    https://link.theplatform.com/s/fox-dcg/media/GXqOAYqzoOBQ?affiliate=FNC&assetTypes=active-live-stream&cdn=cf&dma=512&format=redirect&formats=JSON%2CM3U%2CText&profile=516429%3Auplynk_foxnow_webdesktop_live&ptid=foxnow_web_fnc_tve&sitesection=foxnow%2Fwebdesktop%2Flive%2Ffnc&auth=Sw4FK5r-YPle8laI8bdkYRAuQFCuYJA2&kuid=t7rvryw0k&seg=386123%3Asbsz8qqux%2Cshpmwshty&vcid2=d935a850-0f22-4dfe-a8e6-eefaf880c199&adenv=fw_prod&ad=fw_prod&expand=pingActive
3rd    https://content.uplynk.com/preplay/channel/1e298c9d65a245b3bd37f339cadcca58.json?repl=aboi&ts=&rays=gkjihfedcb&ad=fw_prod&cdn=cf&ad.flags=:slcb+sltp+qtcb+emcr+fbad+dtrd+vicb&ad.csid=foxnow%2Fwebdesktop%2Flive%2Ffnc&ad.prof=516429%3Auplynk_foxnow_webdesktop_live&ad.kvsep=%7C&ad.kv=_fw_ae%7Cnomvpd%7C_fw_us_privacy%7C%7C_fw_did_idfa%7C%7C_fw_did_google_advertising_id%7C%7C_fw_did_android_id%7C%7C_fw_did%7C%7C_fw_nielsen_app_id%7C%7C_fw_vcid2%7Cd935a850-0f22-4dfe-a8e6-eefaf880c199%7Ckuid%7Ct7rvryw0k%7C_fw_seg%7C386123%3Asbsz8qqux%2Cshpmwshty&ad.metr=1031&ad.flexv=2&ad.flex=15&v=2&ad.cping=1&ad.pingf=4&ad.caid=foxnow_FNC_Live&exp=1586444812&tc=1&rn=655584&ct=c&cid=1e298c9d65a245b3bd37f339cadcca58&sig=ef6a3a877bb92c9b47146fe17fe9afa54aea4fed0dda75163480ab33a849ca57
4th    https://content-ause1.uplynk.com/preplay2/channel/1e298c9d65a245b3bd37f339cadcca58/e2cf50530364134a22135dd2b639f596/755bccWbDqbtDd358AjkVK2AOn6OTCnTR47hxBNDvhKU.m3u8?pbs=aee7dcde62cc4c96a4e3096c221f614c
Then inside preplay2/channel from above link (shows different BANDWIDTH=)
Info:
HTTP/1.1 200 OK
Date: Thu, 09 Apr 2020 17:29:57 GMT
Content-Type: application/vnd.apple.mpegurl
Content-Length: 2631
Connection: keep-alive
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Services: d4175a6826864a8e87575217dff8f3d8
Strict-Transport-Security: max-age=31536000; includeSubDomains
Cache-Control: no-cache, no-store
Access-Control-Allow-Origin: *
Referrer-Policy: no-referrer-when-downgrade

#EXTM3U
#EXT-X-VERSION:5
#EXT-UPLYNK-LIVE
#EXT-X-START:TIME-OFFSET=0.00
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="Primary",LANGUAGE="en",AUTOSELECT=YES,DEFAULT=YES
#UPLYNK-MEDIA0:1280x720x60,high-32,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=1280x720,BANDWIDTH=5637652,CODECS="mp4a.40.5,avc1.640020",FRAME-RATE=60.000,AUDIO="aac",AVERAGE-BANDWIDTH=5065560
https://content-ausw2.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/g.m3u8?pbs=4ab6eadb7f124c59863bf2d73c733387
#UPLYNK-MEDIA0:1280x720x60,high-32,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=1280x720,BANDWIDTH=6813218,CODECS="mp4a.40.5,avc1.640020",FRAME-RATE=60.000,AUDIO="aac",AVERAGE-BANDWIDTH=6134257
https://content-ausw2.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/h.m3u8?pbs=4ab6eadb7f124c59863bf2d73c733387
#UPLYNK-MEDIA0:1280x720x60,main-32,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=1280x720,BANDWIDTH=3805703,CODECS="mp4a.40.5,avc1.4d0020",FRAME-RATE=60.000,AUDIO="aac",AVERAGE-BANDWIDTH=3400152
https://content-ausw2.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/f.m3u8?pbs=4ab6eadb7f124c59863bf2d73c733387
#UPLYNK-MEDIA0:960x540x60,main-32,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=960x540,BANDWIDTH=2744102,CODECS="mp4a.40.5,avc1.4d0020",FRAME-RATE=60.000,AUDIO="aac",AVERAGE-BANDWIDTH=2435060
https://content-ausw2.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/e.m3u8?pbs=4ab6eadb7f124c59863bf2d73c733387
#EXT-X-I-FRAME-STREAM-INF:PROGRAM-ID=1,RESOLUTION=960x540,BANDWIDTH=44728,CODECS="avc1.4d0020",URI="https://content-ausw2.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/ifo.m3u8?pbs=4ab6eadb7f124c59863bf2d73c733387"
#UPLYNK-MEDIA0:768x432x30,main-30,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=768x432,BANDWIDTH=1414542,CODECS="mp4a.40.5,avc1.4d001e",FRAME-RATE=30.000,AUDIO="aac",AVERAGE-BANDWIDTH=1226369
https://content-ausw2.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/d.m3u8?pbs=4ab6eadb7f124c59863bf2d73c733387
#UPLYNK-MEDIA0:640x360x30,baseline-30,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=640x360,BANDWIDTH=980108,CODECS="mp4a.40.5,avc1.42001e",FRAME-RATE=30.000,AUDIO="aac",AVERAGE-BANDWIDTH=831429
https://content-ausw2.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/c.m3u8?pbs=4ab6eadb7f124c59863bf2d73c733387
#UPLYNK-MEDIA0:480x270x30,baseline-21,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=480x270,BANDWIDTH=574225,CODECS="mp4a.40.5,avc1.420015",FRAME-RATE=30.000,AUDIO="aac",AVERAGE-BANDWIDTH=462445
https://content-ausw2.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/b.m3u8?pbs=4ab6eadb7f124c59863bf2d73c733387
Is there a way to either capture/play highest bandwith or have a menu to choose bandwidth?

Not a big deal if it can not be CODED - but- I find this challenge interesting and would like to learn.

As Always, Thanks
m5
 

m5Germany

Active member
Mar 20, 2014
230
72
28
Oh, I do have this (and it has been working for the last 5 hours) but not sure how long it will last as I'm pretty sure it is a dynamic address as "pbs=changes:
Example:
<item>
<title>040920 2.55p [COLOR=FF00FFFF]USA |[COLOR=FF00FF00] FOX News - fox.com ([COLOR=red]HD[/COLOR])[/COLOR] | RegEx</title>
<link>https://content-ause1.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/f.m3u8?pbs=aee7dcde62cc4c96a4e3096c221f614c|User-Agent=Mozilla/5.0&amp;Referer=https://www.fox.com/live/channel/FNC/?id=328726054631</link>
</item>
Not sure if CODE works for others.

As Always, Thanks.
m5
 

altug

Member
Jul 7, 2016
70
2
8
<item>
<title> SHOW TV</title><link>$doregex[m3u8]</link>
<regex><name>m3u8</name>
<expres><![CDATA[#$pyFunction
import re
from AADecoder import AADecoder
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
inf=re.findall('script>([^<]+)[\w\W]*?file.+?\+[\'"]([^\'"]+)',page_data)[0]; html=re.findall("=\s*'([^']+).+?\s+'([^']+)",AADecoder(inf[0]).decode())[0]
return html[0]+inf[1]+html[1]+'|User-Agent=iPad&Referer=http://canlitvizle.com/yayinim.php?kanal=show-tv-online-izle'
]]></expres>
<page>http://canlitvizle.com/yayinim.php?kanal=show-tv-online-izle</page>
<referer>https://canlitvizle.com/show-tv-online-izle</referer>
</regex><thumbnail>https://vignette.wikia.nocookie.net/logopedia/images/f/f1/Logo_of_Show_TV.png</thumbnail>
</item>
it doesn't work
 
  • Like
Reactions: umonkey

dantas1990

Member
Apr 10, 2020
55
1
8
Hi guys.



How do I reproduce these channels from these sites? To play on KODI.






Thank you very much in advance.
 
Last edited by a moderator:
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5