LSP Regex & Makelist Discussion.

tungbeng95

Member
Oct 25, 2018
386
13
18

peterpan

Active member
Jul 7, 2013
117
84
28
@tungbeng95 It's working just fine for me!



XML:
<item>
<title>BT1 **www.tvr.by/plugines/online-tv-main.php?channel=tv&chan_id=bt1**</title>
<link>$doregex[PlayStream]|User-Agent=iPad</link>
<regex>
<name>PlayStream</name>
<expres>file:"(.*?)"</expres>
<page>https://www.tvr.by/plugines/online-tv-main.php?channel=tv&amp;chan_id=bt1</page>
<agent>iPad</agent>
<cookieJar></cookieJar>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

asiantv

New member
Jul 12, 2020
12
0
1
any one know any regex to view youtube channel video, this not work anymore
Code:
<item>
<title>UIE Movie</title>
<link>$doregex[makelist]</link>
<regex><name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param1]</title>
<link>plugin://plugin.video.youtube/play/?video_id=[makelist.param2]</link>
<thumbnail>https://i.ytimg.com/vi/[makelist.param2]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres>title="(.*?)".*?watch\?v=(.*?)[",&amp;]</expres>
<page>https://www.youtube.com/channel/UCJMrLeR-WZmwmYX-WLBiFKg/videos</page>
</regex>
<thumbnail></thumbnail>
</item>
 

efradncr

Member
Mar 26, 2018
62
1
8
debería funcionarte el código de @peterpan
Code:
<item>
<title>https://www.youtube.com/c/UIEMovies/playlists</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param2][/COLOR]</title>
<link>$doregex[makelist1]|user-agent=iPad</link>
<thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[height":138.*?"(https.*?jpg)\?sqp(?s).*?text":"(.*?)"(?s).*?playlist.*?:"(.*?)".*?"height":138]]></expres>
<page>https://www.youtube.com/c/UIEMovies/playlists</page>
</regex>

<regex>
<name>makelist1</name>
<listrepeat><![CDATA[
  <title>[COLOR gold] [makelist1.param1][/COLOR]</title>
  <urlsolve>https://www.youtube.com/watch?v=[makelist1.param2]</urlsolve>
  <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  if '"pl-load-more-destination' in page_data:
     lists=re.findall('id="pl-load-more-destination">(?s)(.*?)</tbody',page_data)[0].replace('amp;','').replace('#038;','').replace('&#39;','\'').replace('&quot;','"')
     YTid=re.findall('data-video-id="(.*?)"',lists)
     title=re.findall('data-title="(.*?)"',lists)
     return zip(title,YTid)
  else:
     lists=re.findall('window."ytInitialData"(?s)(.*?)window."ytInitialPlayerResponse',page_data)[0].replace('amp;','').replace('#038;','').replace('&#39;','\'').replace('&quot;','"')
     title=re.findall('views"}},"simpleText":"(\w[^"]+)',lists)
     YTid=re.findall('"playlistVideoRenderer":{"videoId":"([^"]+)',lists)
     return zip(title,YTid)
]]></expres>
<page>https://www.youtube.com/playlist?list=[makelist.param3]</page>
</regex>
</item>
 

peterpan

Active member
Jul 7, 2013
117
84
28
@asiantv I cannot test this code right now, but (in thoery) it should work for the first 15 videos :)

XML:
<item>
<title>UIE Movie</title>
<link>$doregex[makelist]</link>
<regex><name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param2]</title>
<link>plugin://plugin.video.youtube/play/?video_id=[makelist.param1]</link>
<thumbnail>https://i.ytimg.com/vi/[makelist.param1]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres>:138.+?https.*?vi\/(.*?)\/(?s).+?label":"(.*?).\|</expres>
<page>https://www.youtube.com/channel/UCJMrLeR-WZmwmYX-WLBiFKg/videos</page>
</regex>
<thumbnail>https://yt3.ggpht.com/a/AATXAJzkq4FeQXtbT2ZOTH7Dbsd6s00fhB8d38y6ip2rZA=s100-c-k-c0xffffffff-no-rj-mo</thumbnail>
</item>
 

boul

Member
Nov 24, 2017
34
0
6
[email protected], this regex search to youtube don't work. THANK

<item>
<title>SEARCH YOUTUBE</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param2]</title>
<urlsolve>hXXps://www.youtube.com/watch?v=[makelist.param1]</urlsolve>
<thumbnail>https://i.ytimg.com/vi/[makelist.param1]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,time,urllib,xbmc
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
def get_SearchQuery():
keyboard=xbmc.Keyboard();keyboard.setHeading('Search Here:');keyboard.doModal()
if keyboard.isConfirmed():
itext=urllib.quote_plus(keyboard.getText())
return itext
gtext=get_SearchQuery()
sUrl='https://www.youtube.com/results?search_query=%s&pbj=1'%gtext
headers={'user-agent':'Mozilla/5.0','host':'www.youtube.com','referer':'https://www.youtube.com/','accept':'*/*'}
source=requests.get(sUrl,headers=headers,cookies=Cookie_Jar).content.replace('amp;','').replace('&#39;','\'').replace('\\','')
return re.findall('data-video-ids="([^"]+)[\w\W]*?"ltr">([^<]+)',source)
]]></expres>
<page></page>
</regex>
<thumbnail>hXXps://www.wearediagram.com/hubfs/YouTube_Search.jpg</thumbnail>
<item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
962
434
63
USA
Try this:

LSP XML Code:
<item>
<title>SEARCH YOUTUBE</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>([makelist.param3]) [makelist.param2]</title>
  <urlsolve>https://www.youtube.com/watch?v=[makelist.param1]</urlsolve>
  <thumbnail>https://i.ytimg.com/vi/[makelist.param1]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,urllib,xbmc
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  def get_SearchQuery():
     keyboard=xbmc.Keyboard();keyboard.setHeading('Search Here:');keyboard.doModal()
     if keyboard.isConfirmed():
        itext=urllib.quote_plus(keyboard.getText())
     return itext
  gtext=get_SearchQuery()
  source=urllib.urlopen('https://m.youtube.com/results?search_query=%s'%gtext).read()
  list=re.findall('"contents":(?s)(.*?)window\["ytInitialPlayerResponse',source)[0].replace('amp;','').replace('\u0026','&').replace('#038;','').replace('&#39;','\'').replace('&quot;','"')
  return re.findall('"videoRenderer":{"videoId":"([^"]+).+?"title":{"runs":\[{"text":"([^"]+).+?"lengthText".+?"simpleText":"([^"]+)',list)
]]></expres>
<page></page>
</regex>
<thumbnail>https://www.wearediagram.com/hubfs/YouTube_Search.jpg</thumbnail>
<item>
 
  • Like
Reactions: boul and peterpan

peterpan

Active member
Jul 7, 2013
117
84
28
@streamwatcher2013 Thanks m8! Is there a way to retrieve all search results in Youtube? As you know, if you scroll down he page keeps "spinning" and retrieves/shows more search result videos. Aside from videos shown on the 1st page, I couldn't figure out a way to capture next page(s) vids! Cheers!
 
  • Like
Reactions: m5Germany

streamwatcher2013

Well-known member
Oct 24, 2013
962
434
63
USA
@peterpan @m5Germany

For next page

LSP XML code:
<item>
<title>YOUTUBE Search 4 pages</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>([makelist.param3]) [makelist.param2]</title>
  <urlsolve>https://www.youtube.com/watch?v=[makelist.param1]</urlsolve>
  <thumbnail>https://i.ytimg.com/vi/[makelist.param1]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,urllib,xbmc
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  def get_SearchQuery():
     keyboard=xbmc.Keyboard();keyboard.setHeading('Search Here:');keyboard.doModal()
     if keyboard.isConfirmed():
        itext=urllib.quote_plus(keyboard.getText())
     return itext
  gtext=get_SearchQuery()
  sUrl='https://m.youtube.com/results?search_query=%s'%gtext
  jdata=requests.get(sUrl,headers={'user-agent':'ipad'}).content.replace('amp;','').replace('\u0026','&').replace('#038;','').replace('&#39;','\'').replace('&quot;','"')
  list=re.findall('VideoRenderer":{"videoId":"([^"]+).+?"title":{"runs":\[{"text":"([^"]+).+?"lengthText":.+?(?:T|t)ext":"([^"]+)',jdata)
  tok1=re.findall('"nextContinuationData":{"continuation":"([^"]+)',jdata)[0]
  jdata1=requests.get('%s&ctoken=%s'%(sUrl,tok1),headers={'user-agent':'ipad','referer':sUrl}).content.replace('amp;','').replace('\u0026','&').replace('#038;','').replace('&#39;','\'').replace('&quot;','"')
  list1=re.findall('VideoRenderer":{"videoId":"([^"]+).+?"title":{"runs":\[{"text":"([^"]+).+?"lengthText":.+?(?:T|t)ext":"([^"]+)',jdata1)
  return list+list1
]]></expres>
<page></page>
</regex>
<thumbnail>https://www.wearediagram.com/hubfs/YouTube_Search.jpg</thumbnail>
<item>
 
  • Like
Reactions: DerWolf and boul

tnico

New member
May 29, 2015
20
0
1
this don't work, please need help.

<item>
<Title>Télé Quebec </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('src="(.*?player[^"]+)',page_data)[0]
source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://zonevideo.telequebec.tv/endirect/'},cookies=Cookie_Jar).content
return re.findall('l.{13,15}Url":"(\w[^"]+)',source)[0]+'|user-agent=ipad&referer='+link
]]></expres>
<page>https://zonevideo.telequebec.tv/endirect/</page>
<referer>https://zonevideo.telequebec.tv/</referer>
</regex>
<thumbnail>https://www.telequebec.tv/apple-touch-icon.png</thumbnail>
</item>
 
Jun 6, 2017
37
0
6
Please. any solution for

Code:
hxxps://nowagoal.com/embed/ch7.php
 

peterpan

Active member
Jul 7, 2013
117
84
28
@captainhardlock Here you go...



XML:
<item>[I][SIZE=2] # courtesy of @streamwatcher2013 [/SIZE][/I]
<title>Channel 7 **http://nowagoal.com/embed/ch7.php**</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):
  link=re.findall('iframe\s*src=[\'"]([^\'"]+)',page_data)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'http://nowagoal.com/embed/ch7.php','accept':'*/*'}).content
  url=re.findall('iframe\s*src=[\'"]([^\'"]+)',source)[0];url='https:'+url if url.startswith('//') else url
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':link,'accept':'*/*'}).content
  m3u8=jsunpack.unpack(re.findall('(eval.*(?:m3u8|mp4).*)',source)[0])
  return re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',m3u8)[0]+'|user-agent=Mozilla/5.0&referer='+url
]]></expres>
<page>http://nowagoal.com/embed/ch7.php</page>
<referer>http://nowagoal.com/</referer>
</regex>
</item>
 

redota

New member
Jul 3, 2016
23
2
3
hello ,need help,this user have 388 videos and please need regex for open in lsp all videos thanks guys for you help

hxxps://www.youtube.com/c/piscuajo/videos
 

mant

New member
Oct 29, 2018
8
0
1
Would you please regex all channel.
Thank you

Code:
hxxps://myklik.rtm.gov.my/channel/tv-4
 

peterpan

Active member
Jul 7, 2013
117
84
28
@mant Ch4 is geo-blocked, but if they use the same format, this link may work for you...

XML:
<item>
<title>RTM4</title>
<link>https://rtm4.secureswiftcontent.com/Origin01/ngrp:RTM1/playlist.m3u8|User-Agent=iPad&amp;Referer=https://myklik.rtm.gov.my/</link>
<regex>


XML:
<item>
<title>**https://myklik.rtm.gov.my/**</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param1]</title>
<link>[makelist.param2]|user-agent=iPad</link>
<thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  source = requests.get('https://myklik.rtm.gov.my/bs-api/RTM3(epg)/channels?type=epg',headers={'user-agent':'Mozilla/5.0','referer':'https://myklik.rtm.gov.my/','Authorization':''}).content
  return re.findall('title":"(.*?)"(?s).+?hbbtv.*?url":"(.*?u8)"(?s).*?imageUrls":."(.*?)"',source)
]]></expres>
<page>https://myklik.rtm.gov.my/bs-api/RTM3(epg)/channels?type=epg</page>
</regex>
<item>
 
  • Like
Reactions: mant

omoobatv

New member
Feb 15, 2018
22
0
1
Hi,

can any pro in the house help me with the regex of any of the below sites. I have tried but seems something is hidden so its not working.


Code:
https://bestteachers4u.com/bbnaija-2020-reunion-show-live-stream/
<item>
<title>BBN</title>
<link>$doregex[getM3U8]|Referer:https://bestteachers4u.com/bbnaija-2020-reunion-show-live-stream/</link>
<regex>
<name>getM3U8</name>
<expres>source.*?(h.*m3u8)',</expres>
<page>https://bestteachers4u.com/bbnaija-2020-reunion-show-live-stream/</page>
<cookieJar></cookieJar>
<referer>https://bestteachers4u.com/</referer>
</regex>
</item>
or

Code:
http://www.jblivestream.com/event/bbnaija-2020-live-stream


Thanks
 

upd8t3r

Member
Oct 16, 2019
46
18
8
Here you go, same thing just 2 different ways

XML:
<item>
<title>[B]BBN[/B]</title>
<link>$doregex[getUrl]</link>
<thumbnail>https://bestteachers4u.com/wp-content/uploads/2020/05/Some-BBNaija-Pepper-Dem-Housemates-300x162.jpg</thumbnail>   
<fanart>https://bestteachers4u.com/wp-content/uploads/2020/05/Some-BBNaija-Pepper-Dem-Housemates-300x162.jpg</fanart>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  page=requests.get('https://bestteachers4u.com/bbnaija-2020-reunion-show-live-stream/',headers={'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36','referer':'https://bestteachers4u.com/bbnaija-2020-reunion-show-live-stream/','origin': 'https://bestteachers4u.com','accept':'*/*'}).content
  url=re.findall("source:\s*'(.*?)'",page)[0]
  return url+'|user-agent=iPad&referer=https://bestteachers4u.com/bbnaija-2020-reunion-show-live-stream/'
]]></expres>
<page>https://bestteachers4u.com/bbnaija-2020-reunion-show-live-stream/</page>
<referer>https://bestteachers4u.com/</referer>
</regex>
</item>




<item>
<title>[B]BBN[/B]</title>
<link>$doregex[getM3U8]|Referer=https://bestteachers4u.com/bbnaija-2020-reunion-show-live-stream/&amp;User-Agent=iPad</link>
<thumbnail>https://bestteachers4u.com/wp-content/uploads/2020/05/Some-BBNaija-Pepper-Dem-Housemates-300x162.jpg</thumbnail>    
<fanart>https://bestteachers4u.com/wp-content/uploads/2020/05/Some-BBNaija-Pepper-Dem-Housemates-300x162.jpg</fanart>
<regex>
<name>getM3U8</name>
<expres>source:\s*'(.*?)',</expres>
<page>https://bestteachers4u.com/bbnaija-2020-reunion-show-live-stream/</page>
<cookieJar></cookieJar>
<referer>https://bestteachers4u.com/</referer>
</regex>
</item>
 

C-3PO

New member
Nov 5, 2015
5
0
1
Can anyone help with a makelist for this site? Thanks in advance

Code:
https://dooball66.com/%e0%b8%94%e0%b8%b9%e0%b8%9a%e0%b8%ad%e0%b8%a5%e0%b8%ad%e0%b8%ad%e0%b8%99%e0%b9%84%e0%b8%a5%e0%b8%99%e0%b9%8c/
 

urualf

Member
Jan 19, 2016
42
0
6
hello ,thanks for you help everyday and now need help for us this link in lsp,y

hxxps://www.rtve.es/alacarta/videos/tango/tango-capitulo-1/5505707/
 

DerWolf

Member
Nov 20, 2019
43
5
8
hxxps://www.google.com/amp/s/www.dailyiptvlist.com/amp/

can you help me this site makelist please
 
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5