LSP Regex & Makelist Discussion.

coolstud

New member
Oct 17, 2012
8
2
1
Please can someone make a simple makelist for the episode hxxps://vimeo.com link on the website below:-

Code:
https://osmanonline.co.uk/?page_id=207
Code:
https://osmanonline.co.uk/?page_id=207
 
Last edited by a moderator:

streamwatcher2013

Active member
Oct 24, 2013
474
89
28
USA
That's a simple one:

LSP XML:
<item>
<title>https://osmanonline.co.uk/?page_id=207</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('"progressive"(?s)(.*?)"barebone_js',page_data)[0]
  if '1080' in list:
    return re.findall('.+"url":"([^"]+).+?"quality":"1080',list)[0]+'|user-agent=ipad&referer=https://player.vimeo.com/video/376074487'
  elif '720' in list:
    return re.findall('.+"url":"([^"]+).+?"quality":"720',list)[0]+'|user-agent=ipad&referer=https://player.vimeo.com/video/376074487'
  else:
    return re.findall('.+"url":"([^"]+).+?"quality":"540',list)[0]+'|user-agent=ipad&referer=https://player.vimeo.com/video/376074487'
]]></expres>
<page>https://player.vimeo.com/video/376074487</page>
<referer>https://osmanonline.co.uk/?page_id=207</referer>
</regex>
</item>
 
  • Like
Reactions: coolstud and altug

coolstud

New member
Oct 17, 2012
8
2
1
Thank you very much streamwatcher2013 much appreciated, also if I want to add mutiple links within the same item how would I do that with vimeo links again. e.g

Code:
https://kurulusosman.online/kurulus-osman-season-1-episode-1-english-bolum-1/


https://historicalfuntv.com/episodes/kurulus-osman-season-1-episode-1-with-english-subtitles/
 
Last edited by a moderator:

streamwatcher2013

Active member
Oct 24, 2013
474
89
28
USA
Do you mean like this:

LSP XML:
<item>
<title>Kuruluş Osman</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
 <title>[COLOR gold]Kuruluş Osman  [/COLOR][[makelist.param2]]</title>
 <link>$doregex[getUrl]</link>
 <thumbnail>https://kurulusosman.online/media/sites/2/2019/10/kurtulus_osman_online_white.png</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  links=['https://osmanonline.co.uk/?page_id=207','https://kurulusosman.online/kurulus-osman-season-1-episode-1-english-bolum-1/','https://historicalfuntv.com/episodes/kurulus-osman-season-1-episode-1-with-english-subtitles/']
  data=[]
  for link in links:
    source=requests.get(link,headers={'User-Agent': 'Mozilla/5.0'}).content
    title=re.findall('"canonical".*?//([^\.]+)',source)
    for t in title:
      gtitle=t.title()
      source=source.replace(t,gtitle)
    data += re.findall('(?s)"canonical".+?"(.*?//(.+?\w[^\.]+)[^"]+).+?iframe\s*src="(.*?player.vimeo[^"]+)',source)
  return data
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  source=requests.get('[makelist.param3]',headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]'.lower(),'accept':'*/*'}).content
  list=re.findall('"progressive":(?s)(.*?)"urls"',source)[0]
  if '1080' in list:
     return re.findall('.+"url":"([^"]+).+?quality":"1080',list)[0]+'|user-agent=ipad&referer=[makelist.param3]'
  elif '720' in list:
     return re.findall('.+"url":"([^"]+).+?quality":"720',list)[0]+'|user-agent=ipad&referer=[makelist.param3]'
  else:
     return re.findall('.+"url":"([^"]+).+?"quality":"540',list)[0]+'|user-agent=ipad&referer=[makelist.param3]'
]]></expres>
<page></page>
</regex>
<thumbnail>https://kurulusosman.online/media/sites/2/2019/10/kurtulus_osman_online_white.png</thumbnail>
</item>
 

htpcforall

New member
Sep 15, 2012
6
0
1
West Coast USA
@ streamwatcher2013 - First... Thanks for all you contribute.

I'm having some trouble with HLS in Jarvis. The streams actually play fine until a commercial ad break. Then they freeze/pause and eventually stop. It looks like there's a redirect in the manifest during the commercial break for the ad segments and it's not being handled correctly. I appreciate any input you can provide. I searched high and low without success.

Thanks,
J
 

upd8t3r

New member
Oct 16, 2019
4
0
1
How do you use the $pyFunction to replace a single quote? I've tried searching for the answer and figuring out myself but haven't been able to.

For example I have this where I want to replace any single quote with nothing. It's the only character I've come across so far that I can't use the replace by just putting it between the double quotes.

Code:
<expres>$pyFunction:('$doregex[GetLink]').replace(''','')</expres>
 

DerWolf

New member
Nov 20, 2019
12
1
3
it is possible hxxp://uu.canna.to

thanks in advance
 

gujal

Developer
Dec 26, 2013
291
89
28
It is not a audio or video streaming site but a premium hoster link sharing site with captcha enforcement. Can't be done unfortunately
 
  • Like
Reactions: DerWolf

coolstud

New member
Oct 17, 2012
8
2
1
Hi streamwatcher2013

The makelist you gave me doesn't work for episode 3 as I have done below for the same website. Also I missed your last reply for mutiple links, the code doesn't work.

I normally add <sublink></sublink> for mutiple links how would I do that with you code.

<item>
<title>https://osmanonline.co.uk/?page_id=225</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
list=re.findall('"progressive"(?s)(.*?)"barebone_js',page_data)[0]
if '1080' in list:
return re.findall('.+"url":"([^"]+).+?"quality":"1080',list)[0]+'|user-agent=ipad&referer='
elif '720' in list:
return re.findall('.+"url":"([^"]+).+?"quality":"720',list)[0]+'|user-agent=ipad&referer='
else:
return re.findall('.+"url":"([^"]+).+?"quality":"540',list)[0]+'|user-agent=ipad&referer='
]]></expres>
<page></page>
<referer>https://osmanonline.co.uk/?page_id=225</referer>
</regex>
</item>
 

efradncr

Member
Mar 26, 2018
32
0
6
Que tal amigos será posible una Makelist de los canales 6 y 7 básicamente los que tenga el servidor "Ok"
Code:
hxxp://www.fpdenvivo.com/
Gracias de antemano-.
 

DerWolf

New member
Nov 20, 2019
12
1
3
gujal and this possible ?
hxxp://xxx.mtv.de/musik
 

coolstud

New member
Oct 17, 2012
8
2
1
Thank you! streamwatcher2013 for the fix it works on the simple makelist but not the mutiple makelist

The multiple link version still doesn't work for me, this is how I have done it below with:-

Code:
<item>
<title>Kuruluş Osman</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
 <title>[COLOR gold]Kuruluş Osman  [/COLOR][[makelist.param2]]</title>
 <link>$doregex[getUrl]</link>
 <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  links=['https://osmanonline.co.uk/?page_id=207','https://kurulusosman.online/kurulus-osman-season-1-episode-1-english-bolum-

1/','https://historicalfuntv.com/episodes/kurulus-osman-season-1-episode-1-with-english-subtitles/']
  data=[]
  for link in links:
    source=requests.get(link,headers={'User-Agent': 'Mozilla/5.0'}).content
    title=re.findall('"canonical".*?//([^\.]+)',source)
    for t in title:
      gtitle=t.title()
      source=source.replace(t,gtitle)
    data += re.findall('(?s)"canonical".+?"(.*?//(.+?\w[^\.]+)[^"]+).+?iframe\s*src="(.*?player.vimeo.com[^"]+)',source)
  return data
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  source=requests.get('[makelist.param3]',headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]'.lower

(),'accept':'*/*'}).content
  list=re.findall('"progressive"(?s)(.*?)"cdns',page_data)[0]
  if '1080' in list:
     return re.findall('.+"url":"([^"]+).+?quality":"1080',list)[0]+'|user-agent=ipad&referer=[makelist.param3]'
  elif '720' in list:
     return re.findall('.+"url":"([^"]+).+?quality":"720',list)[0]+'|user-agent=ipad&referer=[makelist.param3]'
  else:
     return re.findall('.+"url":"([^"]+).+?"quality":"540',list)[0]+'|user-agent=ipad&referer=[makelist.param3]'
]]></expres>
<page></page>
</regex>
<thumbnail></thumbnail>
</item>
 
  • Like
Reactions: turko03 and DerWolf

coolstud

New member
Oct 17, 2012
8
2
1
I can see your using livestreampro addon which I have never used, I am using the pheonix addon by lambda to add my custom xml.

Your first makelist works but I don't know why the multiple makelist doesn't work, the addon has all the codes to run regex's and the error i get in the log is below:-

02:27:15 T:3056 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.pheonix/?action=xdirectory&content=videos&url=%24doregex%5bmakelist%5d%7cregex%3d6d41d1e996a393931904082284d68018
02:27:15 T:3056 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.pheonix/?action=xdirectory&content=videos&url=%24doregex%5bmakelist%5d%7cregex%3d6d41d1e996a393931904082284d68018) failed
 

umonkey

Member
Sep 18, 2012
48
0
6
Hi,

Is it possible to add Metadata to LSPro via xml such as:

Code:
    <meta>
    <imdb>tt1190080</imdb>
    <content>movie</content>
    <title>2012</title>
    <year>2009</year>
    </meta>
So that it displays all the movies info?

Thanks
 

03stevensmi

New member
Sep 12, 2019
24
1
3
@ streamwatcher2013 Can you help me out? I'm using the latest version of livestreampro. Your latest kimcartoon xml You provided me does not work any more. Would it be ok if you can fix your latest kimcartoon xml With the episode and season picker?
 

03stevensmi

New member
Sep 12, 2019
24
1
3
This is the xml I last used:


<item>


<title>http://kimcartoon.to/</title>


<link>$doregex[makelist]</link>


<regex>


<name>makelist</name>


<listrepeat><![CDATA[


<title>[COLOR gold][makelist.param2][/COLOR]</title>


<link>$doregex[makelist2]</link>


<thumbnail>http://kimcartoon.to/Content/images/logo.png</thumbnail>


]]></listrepeat>


<expres><![CDATA[#$pyFunction


import re,requests,cfscrape


def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013


scraper=cfscrape.create_scraper();source=scraper.get('https://kimcartoon.to/CartoonList').content


# return re.findall('href="/(.+?/([^"]+))',re.findall('genres</div.+\n.+?clear(?s)(.*?)clear',source)[0])


return re.findall('href="/(Genre/([^"]+))',source)


]]></expres>


<page></page>


</regex>


<regex>


<name>makelist2</name>


<listrepeat><![CDATA[


<title>[COLOR gold][makelist2.param2][/COLOR] ([makelist2.param3])</title>


<link>$doregex[makelist3]</link>


<thumbnail>https://www.tvovermind.com/wp-content/uploads/2018/11/KimCartoon-750x422.jpg</thumbnail>


]]></listrepeat>


<expres><![CDATA[#$pyFunction


import re,requests,cfscrape


def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013


scraper=cfscrape.create_scraper();list=scraper.get('https://kimcartoon.to/[makelist.param1]',headers={'user-agent':'Mozilla/5.0','referer':'http://kimcartoon.to/CartoonList'}).content


if '?page' in list:


count=232;pn=1;data=[]


while pn <= int(count):


page='https://kimcartoon.to/[makelist.param1]?page='+str(pn);source=scraper.get(page,headers={'user-agent':'Mozilla/5.0','referer':'http://kimcartoon.to/CartoonList'}).content


data +=re.findall('(?s)class="item".+?href="/([^"]+).+?title="([^"]+).+?"textWhite">([^<]+)',source);pn +=1


return data


elif '?page' not in list:


return re.findall('(?s)class="item".+?href="/([^"]+).+?title="([^"]+).+?"textWhite">([^<]+)',list)


]]></expres>


<page></page>


</regex>


<regex>


<name>makelist3</name>


<listrepeat><![CDATA[


<title>[COLOR gold][makelist2.param2][/COLOR] ([makelist3.param2])</title>


<link>$doregex[makelist4]</link>


<thumbnail>https://www.tvovermind.com/wp-content/uploads/2018/11/KimCartoon-750x422.jpg</thumbnail>


]]></listrepeat>


<expres><![CDATA[#$pyFunction


import re,requests,cfscrape


def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013


scraper=cfscrape.create_scraper();source=scraper.get('https://kimcartoon.to/[makelist2.param1]',headers={'user-agent':'Mozilla/5.0'}).content


cat='[makelist2.param3]'


if 'Epis' in cat:


return re.findall('href="/(.+?(Ep[^\?]+)[^"]+)',re.findall('class="list(?s)(.*?)<(?:/ul|/table)',source)[0])


else:


return re.findall('href="/(.+?/([^\/]+)\?[^"]+)',re.findall('class="list(?s)(.*?)<(?:/ul|/table)',source)[0])


]]></expres>


<page></page>


</regex>


<regex>


<name>makelist4</name>


<listrepeat><![CDATA[


<title>[COLOR gold][makelist2.param2][/COLOR] (Server [makelist4.param2])</title>


<link>$doregex[getUrl]</link>


<thumbnail>https://www.tvovermind.com/wp-content/uploads/2018/11/KimCartoon-750x422.jpg</thumbnail>


]]></listrepeat>


<expres><![CDATA[#$pyFunction


import re,requests,cfscrape


def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013


scraper=cfscrape.create_scraper();source=scraper.get('https://kimcartoon.to/[makelist3.param1]',headers={'user-agent':'Mozilla/5.0'}).content


url='https://kimcartoon.to/'+re.findall('href.+?/(.+?id=[^"]+)',source)[0]


source=scraper.get(url,headers={'user-agent':'Mozilla/5.0','referer':'https://kimcartoon.to/[makelist3.param1]'}).content


return re.findall('href.+?/(.+?id=[^"]+).>(?!FS)((?:FE|Ra)[^<]+)',source)


]]></expres>


<page></page>


</regex>


<regex>


<name>getUrl</name>


<expres><![CDATA[#$pyFunction


import re,requests,cfscrape


def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013


scraper=cfscrape.create_scraper();serv='[makelist4.param1]'


source=scraper.get('https://kimcartoon.to/[makelist4.param1]',headers={'user-agent':'Mozilla/5.0','referer':'https://kimcartoon.to/[makelist3.param1]'}).content


if 'fe' in serv:


url=re.findall('id=.mVideo[\w\W]*?(?:src|file)=[\'"]([^\'"]+)',source)[0].replace('v/','api/source/')


list=scraper.post(url,headers={'user-agent':'Mozilla/5.0','x-requested-with':'XMLHttpRequest','accept':'*/*'},data={'r':'','d':'www.luxubu.review'}).content


if '1080' in list:


return re.findall('.+file":"([^"]+).+?"1080',re.findall('"data"(.*)',list)[0].replace('\\',''))[0]


elif '720' in list:


return re.findall('.+file":"([^"]+).+?"720',re.findall('"data"(.*)',list)[0].replace('\\',''))[0]


else:


return re.findall('.+file":"([^"]+).+?"480',re.findall('"data"(.*)',list)[0].replace('\\',''))[0]


else:


url=re.findall('id=.mVideo[\w\W]*?(?:src|file)=[\'"]([^\'"]+)',source)[0]


list=scraper.get(url,headers={'user-agent':'Mozilla/5.0','accept':'*/*'}).content


if '1080' in list:


return re.findall('src="([^"]+).+?1080',re.findall('id=.videojs(?s)(.*?)</video',list)[0])[0]


elif '720' in list:


return re.findall('src="([^"]+).+?720',re.findall('id=.videojs(?s)(.*?)</video',list)[0])[0]


else:


return re.findall('src="([^"]+).+?480',re.findall('id=.videojs(?s)(.*?)</video',list)[0])[0]


]]></expres>


<page></page>


</regex>


<thumbnail>http://kimcartoon.to/Content/images/logo.png</thumbnail>


</item>
 

03stevensmi

New member
Sep 12, 2019
24
1
3
@ streamwatcher2013 I don’t know why my post came out like that, but if it helps you out a bit, then I’ll be happy. Is it fixable?
 

matri1986

New member
Dec 11, 2019
1
0
1
hello everybody I'm new in the forum and inexperienced at using LSP..pls can someone help me to regex this hxxp://daddylive.live/embed/stream-4.php thanks
 

urualf

New member
Jan 19, 2016
25
0
1
is possible use this link in lsp??? please need help ,thanks guys

hxxps://jetload.net/e/eXcUE0IMrps3?fbclid=IwAR0R7QC-zY8YII72rj45ICfejz1DrjXCl7e0cg72TrDNthlbjm_Qde7Hphk
 
Thread starter Similar threads Forum Replies Date
J Scraper Development 0
D Apple TV 4 44
O Addon Requests 5