LSP Regex & Makelist Discussion.

urualf

Member
Jan 19, 2016
42
0
6
thanks gujal for the regex work perfect but my question is ,the playlist is the 230 and the regex is for only 200.if possible the regex open the complete 230 ??? thanks in advanced

Code:
hxxps://www.youtube.com/playlist?list=PL-4I35YERBxJhLTnvA3KmI4lIDScs1CTT
 

gujal

Developer
Dec 26, 2013
572
318
63
The api call only returns 200 items at a time. As you have more than 200 items in the playlist, you need to use this way
Enjoy!

LSP XML:
<item>
<title>Solamente vos - Capítulos</title>
<thumbnail>https://m.media-amazon.com/images/M/MV5BN2Q5MjY5MDct[email protected]._V1_.jpg</thumbnail>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param1] [COLOR cyan]([makelist.param2])[/COLOR]</title>
<info>[makelist.param3]</info>
<urlsolve>https://www.youtube.com/watch?v=[makelist.param4]</urlsolve>
<thumbnail>[makelist.param5]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data, Cookie_Jar, m, list='PL-4I35YERBxJhLTnvA3KmI4lIDScs1CTT'):
  import requests
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0'}
  apiurl = 'https://www.youtube.com/list_ajax?style=json&action_get_list=1&list={0}&index={1}'
  index = 1
  events = []
  while True:
    page_data = requests.get(apiurl.format(list, index), headers=headers).json()
    items = page_data.get('video')
    index += 200
    for item in items:
      title = item.get('title')
      vid = item.get('encrypted_id')
      info = item.get('description')
      length = item.get('duration')
      thumb = item.get('thumbnail').replace('default', 'hqdefault')
      event = (title, length, info, vid, thumb)
      if event not in events:
        events.append(event)
    if len(events) % 200 != 0:
      return events
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: urualf

JonnyB

New member
Oct 8, 2016
23
6
3
Hi,

Need a little help with a problem with accents, in this full working item:


XML:
<item>
<title>dailysport.pw</title>
<link>$doregex[makelist1]</link>
<regex>
<name>makelist1</name>
<listrepeat><![CDATA[
<title>[makelist1.param1] [makelist1.param2] - [makelist1.param3]</title>
<link>$doregex[makelist2]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re, requests
def GetLSProData(page_data,Cookie_Jar,m):
 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 506.40'}
 url = 'https://dailysport.pw/'
 html = requests.get(url, headers=headers).text
 data = re.findall('<td>(\d+\/\d+)\s+(\d+\:\d+)<\/td>\n.*?<td>(.*?)<\/td>\n.*?<td>.*?(?s)(.*?)<\/tr>', html)
 list = []
 for d in data:
   tmp0 = d[0]
   tmp10 = d[1]
   time = tmp10.zfill(5)
   localtime = int(time[:-3]) - 1
   if localtime > 24:
     localtime -= 24
   if localtime < 1:
     localtime += 24
   localtime = str(localtime) + time[2:]
   tmp1 = localtime.zfill(5)
   tmp2 = d[2].encode('latin-1')
   tmp3 = d[3]
   list.append((tmp0, tmp1, tmp2, tmp3))
 return sorted(list, key=lambda x: (x[0], x[1], x[2]))
]]></expres>
<page></page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
<title>([makelist11.param3]) [makelist2.param2]</title>
<link>[makelist2.param1]|User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 506.40</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re, requests, base64
def GetLSProData(page_data,Cookie_Jar,m):
 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 506.40'}
 url = '''[makelist1.param4]'''
 data = re.findall('href="([^"]+)">([^\<]+)<', url)
 list = []
 for d in data:
   tmp00 = d[0]
   source = 'https://dailysport.pw/' + tmp00
   html = requests.get(source, headers=headers).content
   tmp0 = base64.b64decode(re.findall('window.atob\("([^"]+)"\)', html)[0])
   tmp1 = d[1]
   list.append((tmp0, tmp1))
 return list
]]></expres>
<page></page>
</regex>
</item>
As u can see in <title> of makelist2 there is a [makelist11.param3], the idea is to put in there [makelist1.param3] but if i do that all the items with accents will disapear from makelist1 and only returns the items with no accents.

And if possible some hints about the code, i think the makelist2 is a little slow..., is it possible to move all to one regex?

thanks
 

streamwatcher2013

Well-known member
Oct 24, 2013
962
434
63
USA
@JonnyB
I come up with 2 versions. One is without Formula 1 and one with all (the date and time should be default) . If I have time will do more detail on version #2. Just do it in a rush time, have to go. Try these:

LSP XML Code:
<item>
<title>https://dailysport.pw/ either English or Spanish Channels</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR dodgerblue][makelist.param1] [[makelist.param2]] - [COLOR gold][makelist.param3][/COLOR]</title>
  <link>[makelist.param4]|user-agent=ipad</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,datetime
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
 source=requests.get('https://dailysport.pw/',headers={'user-agent':'Mozilla/5.0'},verify=False).text
 data=re.findall('<td>(\d+\/\d+)\s*(\d+:\d+).+\n.*?<td>([^<]+).+\n.+\n.+?Channel\s*(\d+)',source)  # English
# data=re.findall('<td>(\d+\/\d+)\s*(\d+:\d+).+\n.*?<td>([^<]+).+\n.+?Channel\s*(\d+)',source)  # Spanish
 list=[]
 for d in data:
#   tmp0=datetime.datetime.strptime(d[0], '%d/%m').strftime('%m/%d')   # month/day
   tmp0=d[0]  # default day/month
   tmp10=d[1]
   time=tmp10.zfill(5)
   localtime=int(time[:-3]) - 6
   if localtime > 24:
     localtime -= 24
   if localtime < 1:
     localtime += 24
   localtime=str(localtime) + time[2:]
   tmp1=localtime.zfill(5)
   tmp2=d[2].encode('latin-1')
   tmp30='https://dailysport.pw/c'+d[3]+'.php'
   source=requests.get(tmp30,headers={'user-agent':'Mozilla/5.0'},verify=False).content
   tmp3=re.findall('window.atob\("([^"]+)"\)',source)[0].decode('base64')
   list.append((tmp0, tmp1, tmp2, tmp3))
 return sorted(list, key=lambda x: (x[0],x[1],x[2]))
]]></expres>
<page></page>
</regex>
</item>


<item>
<title>https://dailysport.pw/ all channels with F1</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR dodgerblue][[makelist.param1]] - [COLOR gold][makelist.param2][/COLOR]</title>
  <link>[makelist.param3]|user-agent=ipad</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
 source=requests.get('https://dailysport.pw/',headers={'user-agent':'Mozilla/5.0'},verify=False).text
 data=re.findall('<td>([^<]+).+\n.*?<td>([^<]+).+\n.+\n.+?Channel\s*(\d+)',source)  # English
# data=re.findall('<td>([^<]+).+\n.*?<td>([^<]+).+\n.+?Channel\s*(\d+)',source)  # Spanish
 list=[]
 for d in data:
   tmp0=d[0]
   tmp1=d[1].encode('latin-1')
   tmp20='https://dailysport.pw/c'+d[2]+'.php'
   source=requests.get(tmp20,headers={'user-agent':'Mozilla/5.0'},verify=False).content
   tmp2=re.findall('window.atob\("([^"]+)"\)',source)[0].decode('base64')
   list.append((tmp0, tmp1, tmp2))
 return sorted(list, key=lambda x: (x[0],x[1]))
]]></expres>
<page></page>
</regex>
</item>
 

thingy

Member
May 9, 2018
76
1
8
can you help me with a regex for this page?
Code:
hxxxs://crentretenimiento.com/
 

peterpan

Active member
Jul 7, 2013
117
84
28
@thingy What page! I only found one channel lol :)

XML:
<item>
<title>**http://crentretenimiento.com/**</title>
<link>$doregex[url]</link>
<regex>
<name>url</name>
<expres>sourceURL":\s.+?"(.*?)"</expres>
<page>http://crentretenimiento.com/</page>
</regex>
</item>
 

thingy

Member
May 9, 2018
76
1
8
😁😁😁 yes, it looks like a new page, I thank you for the code I almost had it ready because it is very easy but I need to learn more ..
 

boomski

New member
Mar 23, 2017
24
1
3
This code stopped working , can someon fix it ?
Code:
<item>
<title>IB3 TELEVISIÓ DIRECTE</title>
<link>plugin://plugin.video.youtube/play/?video_id=$doregex[id]</link>
<regex>
<name>id</name>
<expres>data-context-item-id="([^"]+)<expres>
<page>https://www.youtube.com/channel/UCff_CBVJDTHP4wOHPjP5BMg</page>
</regex>
<thumbnail></thumbnail>
</item>
 

streamwatcher2013

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

LSP XML code:
<item>
<title>IB3 TELEVISIÓ</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,urllib2,resolveurl
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  source=urllib2.urlopen('https://www.youtube.com/channel/UCff_CBVJDTHP4wOHPjP5BMg').read()
  return resolveurl.resolve('https://www.youtube.com//watch?v='+re.findall('"watchEndpoint":{"videoId":"([^"]+)',source)[0])
]]></expres>
<page></page>
</regex>
<thumbnail>https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/IB3.svg/200px-IB3.svg.png</thumbnail>
</item>
 

tungbeng95

Member
Oct 25, 2018
386
13
18
@peterpan can you help me this: hxxps://reddit-tv-streams.blogspot.com/p/26075.html
 

streamwatcher2013

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

LSP XML code:
<item>
<title>nSport +</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link=re.findall('iframe\s*src="([^"]+)',page_data)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://budcenter.site/livefoot/hdch75.php'}).content
  m3u8=jsunpack.unpack(re.findall('(eval.*m3u8.*)',source)[0])
  return re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',m3u8)[0]+'|user-agent=iapd&referer='+link
]]></expres>
<page>https://budcenter.site/livefoot/hdch75.php</page>
<referer>https://reddit-tv-streams.blogspot.com/p/26075.html</referer>
</regex>
<thumbnail>https://vignette.wikia.nocookie.net/logopedia/images/1/17/NSport_plus.svg/revision/latest/scale-to-width-down/340?cb=20191222164639</thumbnail>
</item>
 
  • Like
Reactions: tungbeng95

vbprofi

Member
Feb 9, 2016
82
3
8
Hello dear friends,
youtube have updated his page. the old code don't work. give an chance to create a new makelist with lsp for this?
Code:
https://www.youtube.com/results?search_query=PELICULAS++DEL+A%C3%91O+COMPLETAS
best regards
 

mustafa19554

Guest
May 17, 2016
28
3
3
Try this :

<item>
<title>PELICULAS </title>
<thumbnail>https://i.pinimg.com/564x/65/24/a2/6524a234d3b20a2619e6ff207821be9b.jpg</thumbnail>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param1] [COLOR cyan]([makelist.param2])[/COLOR]</title>
<info>[makelist.param3]</info>
<urlsolve>https://www.youtube.com/watch?v=[makelist.param4]</urlsolve>
<thumbnail>[makelist.param5]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data, Cookie_Jar, m, list='PLNq2eaZvd5PsY9bF9QTeJ30IRscWVT_4c'):
import requests
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0'}
apiurl = 'https://www.youtube.com/list_ajax?style=json&action_get_list=1&list={0}&index={1}'
index = 1
events = []
while True:
page_data = requests.get(apiurl.format(list, index), headers=headers).json()
items = page_data.get('video')
index += 200
for item in items:
title = item.get('title')
vid = item.get('encrypted_id')
info = item.get('description')
length = item.get('duration')
thumb = item.get('thumbnail').replace('default', 'hqdefault')
event = (title, length, info, vid, thumb)
if event not in events:
events.append(event)
if len(events) % 200 != 0:
return events
]]></expres>
<page></page>
</regex>
</item>
 

vbprofi

Member
Feb 9, 2016
82
3
8
Hello, thanks for the help and such a good job. However, there is only one entry in the list. Somehow the whole entries are not shown. I also cannot play the displayed entry.
Below is the current code:
Code:
<item>
<title>PELICULAS </title>
<thumbnail>https://i.pinimg.com/564x/65/24/a2/6524a234d3b20a2619e6ff207821be9b.jpg</thumbnail>
<link>$doregex[makelist]</link>

<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param1] [COLOR cyan]([makelist.param2])[/COLOR]</title>
<info>[makelist.param3]</info>
<urlsolve>https://www.youtube.com/watch?v=[makelist.param4]</urlsolve>
<thumbnail>[makelist.param5]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import requests
def GetLSProData(page_data, Cookie_Jar, m, list='PLNq2eaZvd5PsY9bF9QTeJ30IRscWVT_4c'):
    headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0'}
    apiurl = 'https://www.youtube.com/list_ajax?style=json&action_get_list=1&list={0}&index={1}'
    index = 1
    events = []
    while True:
        page_data = requests.get(apiurl.format(list, index), headers=headers).json()
        items = page_data.get('video')
        index += 200
        for item in items:
            title = item.get('title')
            vid = item.get('encrypted_id')
            info = item.get('description')
            length = item.get('duration')
            thumb = item.get('thumbnail').replace('default', 'hqdefault')
            event = (title, length, info, vid, thumb)
            if event not in events:
                events.append(event)
            if len(events) % 200 != 0:
                return events
]]></expres>
<page></page>
</regex>
</item>
 

mustafa19554

Guest
May 17, 2016
28
3
3



It is the same as mine, may have occurred when copying errors. I have 102 episodes running. Back then Gujal did another address with Gujal.

<item>
<title>PELICULAS </title>
<thumbnail>https://i.pinimg.com/564x/65/24/a2/6524a234d3b20a2619e6ff207821be9b.jpg</thumbnail>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param1] [COLOR cyan]([makelist.param2])[/COLOR]</title>
<info>[makelist.param3]</info>
<urlsolve>https://www.youtube.com/watch?v=[makelist.param4]</urlsolve>
<thumbnail>[makelist.param5]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data, Cookie_Jar, m, list='PLNq2eaZvd5PsY9bF9QTeJ30IRscWVT_4c'):
import requests
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0'}
apiurl = 'https://www.youtube.com/list_ajax?style=json&action_get_list=1&list={0}&index={1}'
index = 1
events = []
while True:
page_data = requests.get(apiurl.format(list, index), headers=headers).json()
items = page_data.get('video')
index += 200
for item in items:
title = item.get('title')
vid = item.get('encrypted_id')
info = item.get('description')
length = item.get('duration')
thumb = item.get('thumbnail').replace('default', 'hqdefault')
event = (title, length, info, vid, thumb)
if event not in events:
events.append(event)
if len(events) % 200 != 0:
return events
]]></expres>
<page></page>
</regex>
</item>
 

vbprofi

Member
Feb 9, 2016
82
3
8
Thank you for the hint with the indentation. Now all entries are displayed.
I still can't play anything. I have no idea what the problem is.
I'll attach the error log. Maybe someone has an idea what's wrong.

Below is the current updated code:
Code:
import requests
def GetLSProData(page_data, Cookie_Jar, m, list='PLNq2eaZvd5PsY9bF9QTeJ30IRscWVT_4c'):
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0'}
  apiurl = 'https://www.youtube.com/list_ajax?style=json&action_get_list=1&list={0}&index={1}'
  index = 1
  events = []
  while True:
    page_data = requests.get(apiurl.format(list, index), headers=headers).json()
    items = page_data.get('video')
    index += 200
    for item in items:
      title = item.get('title')
      vid = item.get('encrypted_id')
      info = item.get('description')
      length = item.get('duration')
      thumb = item.get('thumbnail').replace('default', 'hqdefault')
      event = (title, length, info, vid, thumb)
      if event not in events:
        events.append(event)
    if len(events) % 200 != 0:
      return events
Below is the current error Log:
Code:
2020-07-12 00:52:57.870 T:18446744073709551614   ERROR: ResolveURL: YouTubeException Error - From: youtube Link: https://www.youtube.com/watch?v=H5UxOo6vQF8: Invalid parameters.
2020-07-12 00:52:57.882 T:18446744073709551614   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'youtube_plugin.youtube.youtube_exceptions.YouTubeException'>
                                            Error Contents: Invalid parameters.
                                            Traceback (most recent call last):
                                              File "addons\plugin.video.live.streamspro\default.py", line 3376, in <module>
                                                playsetresolved (urlsolver(url),name,iconimage,True)
                                              File "addons\plugin.video.live.streamspro\default.py", line 2330, in urlsolver
                                                resolver = resolveurl.resolve(url)
                                              File "addons\script.module.resolveurl\lib\resolveurl\__init__.py", line 129, in resolve
                                                return source.resolve()
                                              File "addons\script.module.resolveurl\lib\resolveurl\hmf.py", line 187, in resolve
                                                stream_url = resolver.get_media_url(self._host, self._media_id)
                                              File "addons\script.module.resolveurl\lib\resolveurl\plugins\youtube.py", line 58, in get_media_url
                                                streams = youtube_resolver.resolve(media_id)
                                              File "addons\plugin.video.youtube\resources\lib\youtube_resolver.py", line 25, in resolve
                                                streams = client.get_video_streams(context=context, video_id=video_id)
                                              File "addons\plugin.video.youtube\resources\lib\youtube_plugin\youtube\client\youtube.py", line 80, in get_video_streams
                                                video_streams = video_info.load_stream_infos(video_id)
                                              File "addons\plugin.video.youtube\resources\lib\youtube_plugin\youtube\helper\video_info.py", line 353, in load_stream_infos
                                                return self._method_get_video_info(video_id)
                                              File "addons\plugin.video.youtube\resources\lib\youtube_plugin\youtube\helper\video_info.py", line 661, in _method_get_video_info
                                                return self._method_watch(video_id, html, reason=params.get('reason', 'UNKNOWN'), meta_info=meta_info)
                                              File "addons\plugin.video.youtube\resources\lib\youtube_plugin\youtube\helper\video_info.py", line 534, in _method_watch
                                                raise YouTubeException(reason)
                                            YouTubeException: Invalid parameters.
                                            -->End of Python script error report<--
2020-07-12 00:52:57.962 T:18446744073709551614   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.live.streamspro/?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DH5UxOo6vQF8&mode=19&iconimage=https%3A%2F%2Fi.ytimg.com%2Fvi%2FH5UxOo6vQF8%2Fhqdefault.jpg]
 

vbprofi

Member
Feb 9, 2016
82
3
8
now that is working well... problem was an old youtube addon version. after update that, it works well.... thanks for your help!!!
 

tungbeng95

Member
Oct 25, 2018
386
13
18
I want help this: hxxps://sports24.club/tv/v?id=ss1
 

streamwatcher2013

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

LSP XML Code:
<item>
<title>Disney</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
    return re.findall('atob.[\'"]([^\'"]+)',page_data)[0].decode('base64')+'|user-agent=ipad&referer=https://sports24.club/tv/v?id=disney'
]]></expres>
<page>https://sports24.club/tv/v?id=disney</page>
<referer>https://sports24.club/</referer>
</regex>
</item>
 

Doom

Member
Sep 16, 2019
318
21
18

streamwatcher2013

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

LSP XML Code:
<item>
<title>KSW</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,urllib,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  if 'embed' in page_data:
    link=re.findall('iframe\s*src="([^"]+)',page_data)[0]
    source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'http://strims.world/live/ramka.php'}).content
    m3u8=jsunpack.unpack(re.findall('(eval.*m3u8.*)',source)[0])
    return re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',m3u8)[0]+'|user-agent=iapd&referer='+link
  else:
    decoded=urllib.unquote_plus(re.findall('unescape.[''"]([^\'"]+)',page_data)[0])
    link=re.findall('iframe\s*src="([^"]+)',decoded)[0]
    source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'http://strims.world/live/ramka.php'}).content
    m3u8=jsunpack.unpack(re.findall('(eval.*m3u8.*)',source)[0])
    return re.findall('player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',m3u8)[0]+'|user-agent=iapd&referer='+link
]]></expres>
<page>http://strims.world/live/ramka.php</page>
<referer>http://strims.world/KSW53.php</referer>
</regex>
<thumbnail>https://www.logolynx.com/images/logolynx/33/339c5315705745fdec1568bafdaa7946.png</thumbnail>
</item>
 
  • Like
Reactions: Doom

asiantv

New member
Jul 12, 2020
12
0
1
greeting friend,

i use this code from here, the site change, now it can view the title only, not able to play. anyone can help me fix it. thank you

Code:
<item>
<title>ICdrama</title>
<thumbnail></thumbnail>
<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):#streamwatcher2013
  count=6;pn=1;data=[]
  while pn <= int(count):
    page='https://windrama.com/drama?page='+str(pn);source=requests.get(page,headers={'user-agent':'ipad','referer':'https://windrama.com/drama','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://windrama.com/drama</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):#streamwatcher2013
  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://windrama.com/drama</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://windrama.com/drama','accept':'*/*'}).content
  decoded=jsunpack.unpack(re.findall('(eval.+?);</',source)[0]).replace('\\','')
  urltok=re.findall('url:\s*[\'"](\w[^\'"]+)',decoded)[-1]
  link='https://video.windrama.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>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
962
434
63
USA
Small changed

LSP XML Code:
<item>
<title>ICdrama</title>
<thumbnail></thumbnail>
<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):#streamwatcher2013
  count=6;pn=1;data=[]
  while pn <= int(count):
    page='https://windrama.com/drama?page='+str(pn);source=requests.get(page,headers={'user-agent':'ipad','referer':'https://windrama.com/drama','accept':'*/*'}).content
    data +=re.findall('<img\s*src="(h[^"]+).+?href="(.*?)"\s*title="([^"]+)',re.findall('id="page-content">(?s)(.*?)(?:<nav|pagi)',source)[0].replace('&#039;','\''));pn +=1
  return data
]]></expres>
<page>https://windrama.com/drama</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):#streamwatcher2013
  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://windrama.com/drama</referer>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  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://windrama.com/drama','accept':'*/*'}).content
  decoded=jsunpack.unpack(re.findall('.+(eval.+?);</script>\s*</body></html>',source)[0]).replace('\\','')
  urltok=re.findall('url:\s*[\'"](\w[^\'"]+)',decoded)[0]
  link='https://video.windrama.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>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
962
434
63
USA
Or more smart move replace the below section

LSP XML Code:
<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://windrama.com/drama','accept':'*/*'}).content
  decoded=jsunpack.unpack(re.findall('.+(eval.*loadPlayer[^\s<]+);',source)[0]).replace('\\','')
  urltok=re.findall('url:\s*[\'"](\w[^\'"]+)',decoded)[0]
  link='https://video.windrama.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>
 

efradncr

Member
Mar 26, 2018
62
1
8
podrían ayudarme con una makelist de este canal de youtube?
Code:
https://www.youtube.com/c/LosIgnorantestv/playlists
 

peterpan

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



XML:
<item>
<title>Los Ignorantes TV **https://www.youtube.com/c/LosIgnorantestv/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/LosIgnorantestv/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>
 
  • Like
Reactions: efradncr

redota

New member
Jul 3, 2016
23
2
3
hi master if possible regex for this page for use in lsp? thanks for you help
hxxs://retropelistv.com/
 

peterpan

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



XML:
<item>
<title>RetroPelisTV **https://retropelistv.com/**</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param4][/COLOR] - [COLOR green][makelist.param5][/COLOR] [COLOR neon]([makelist.param6])[/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('article id="post-(.*?)".*?img.src="(.*?)".*?<h3>.*?href="(.*?)">(.*?)<.*?span>(.*?)<.*?(IMDb.*?)<',re.findall('<h1>Películas<.h1>(?s).+?class=.resppages',page_data)[0])
  url='https://retropelistv.com/index.php/movies/'
  #lastpg=re.findall('Página 1 de.(.*?)<',page_data)[0]
  for pn in xrange(2,5):
    source=requests.get(url+'page/'+str(pn),cookies=Cookie_Jar,headers={'user-agent':'Mozilla/5.0','Host':'retropelistv.com','referer':'https://retropelistv.com/','Upgrade-Insecure-Requests':'1','accept':'*/*'}).content
    list +=re.findall('article id="post-(.*?)".*?img.src="(.*?)".*?<h3>.*?href="(.*?)">(.*?)<.*?span>(.*?)<.*?(IMDb.*?)<',re.findall('<h1>Películas<.h1>(?s).+?class=.resppages',source)[0])
  return list
]]></expres>
<page>https://retropelistv.com/index.php/movies/</page>
</regex>

<regex>
<name>id</name>
<expres>embed_url":"https.*?v..(.*?)#</expres>
<page>https://retropelistv.com/wp-json/dooplayer/v1/post/[makelist.param1]?type=movie&amp;source=1</page>
</regex>

<regex>
<name>link</name>
<expres>(?s).+?480p.+?"file":"(.*?)".+?720</expres>
<page>https://feurl.com/api/source/$doregex[id]</page>
<referer>https://feurl.com/v/$doregex[link]</referer>
<rawpost>r=$doregex[EncodeURL]&amp;d=feurl.com</rawpost>
<cookieJar></cookieJar>
<x-req>XMLHttpRequest</x-req>
</regex>

<regex>
<name>EncodeURL</name>
<expres>$pyFunction:urllib.quote_plus('[makelist.param3]')<expres>
<page></page>
</regex>   

<regex>
<name>getUrl</name>
<expres>$pyFunction:'$doregex[link]'.replace('\/','/')</expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: redota

peterpan

Active member
Jul 7, 2013
117
84
28
The above code gives you the first 120 movies. You can get more by inceasing the xrange in "for pn in xrange(2,5):" to 10, or 20 if you wish...
Also as coded, the movies will play dubbed in Spanish. You can switch to English audio by changing source to '2' in the id regex "...?type=movie&amp;source=1"
 
  • Like
Reactions: redota

tungbeng95

Member
Oct 25, 2018
386
13
18
Can you help me this regex: hxxp://www.ichannela.com/com/cmm/onair.do
 

peterpan

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



XML:
<item>
<title>**http://www.ichannela.com/com/cmm/onair.do**</title>
<link>$doregex[URL]|User-Agent=iPad</link>
<regex>
<name>URL</name>
<expres>vUrl":"(.*?)"<expres>
<page>http://www.ichannela.com/com/cmm/onair.do</page>
</regex>   
</item>
 
  • Like
Reactions: tungbeng95

asiantv

New member
Jul 12, 2020
12
0
1
hi guys, can get this one for lsp?

Code:
https://animepahe.com/anime/5f6f7c08-31d4-b755-0ca6-c6042318124e
 

peterpan

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



XML:
<item>
<title>One Piece - Animation</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold]One Piece[/COLOR] -- [COLOR green] Episode: [/COLOR][makelist.param1]</title>
<link>$doregex[PlayStream]|User-Agent=iPad&amp;Referer=https://kwik.cx/e/$doregex[ID]&amp;Origin=https://kwik.cx</link>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re, requests
def GetLSProData(page_data,Cookie_Jar,m):
 url = 'https://animepahe.com/api?m=release&id=4&l=30&sort=episode_desc&page='
 source = requests.get(url,cookies=Cookie_Jar,headers={'user-agent':'Mozilla/5.0','Referer':'page_data','Host':'animepahe.com','X-Requested-With':'XMLHttpRequest','accept':'*/*'}).content
 list = re.findall('episode":(.*?),.*?snapshot":"(.*?)".*?session":"(.*?)"', source)
 for pn in xrange(2,33):
   source = requests.get(url+str(pn),cookies=Cookie_Jar,headers={'user-agent':'Mozilla/5.0','Referer':'page_data','Host':'animepahe.com','X-Requested-With':'XMLHttpRequest','accept':'*/*'}).content
   list +=re.findall('episode":(.*?),.*?snapshot":"(.*?)".*?session":"(.*?)"',source)
 return list
]]></expres>
<page></page>
<cookieJar></cookieJar>
</regex>

<regex>
<name>ID</name>
<expres>"kwik":"http.*?\\\/e\\\/(.*?)".*?1080(.*?)"</expres>
<page>https://animepahe.com/api?m=links&amp;id=4&amp;session=[makelist.param3]&amp;p=kwik</page>
<referer>https://animepahe.com/play/5f6f7c08-31d4-b755-0ca6-c6042318124e/[makelist.param3]</referer>
<x-req>XMLHttpRequest</x-req>
<cookieJar></cookieJar>
</regex>

<regex>
<name>getUnPacked</name>
<expres>$pyFunction:get_unpacked(page_data,'eval.*?(eval.*)')</expres>
<page>https://kwik.cx/e/$doregex[ID]</page>
<referer>https://animepahe.com/play/5f6f7c08-31d4-b755-0ca6-c6042318124e/[makelist.param3]</referer>
<x-req>XMLHttpRequest</x-req>
<cookieJar></cookieJar>
</regex>

<regex>
<name>PlayStream</name>
<expres>source='(.*?)'</expres>
<page>$doregex[getUnPacked]</page>
<referer>https://animepahe.com/play/5f6f7c08-31d4-b755-0ca6-c6042318124e/[makelist.param3]</referer>
<x-req>XMLHttpRequest</x-req>
<cookieJar></cookieJar>
</regex>
</item>
 

Download

New member
Jun 16, 2016
19
7
3
Japan
Hi!
Need a little help in this full working list. This website sign up for free. Help me edit it to regex to work with all channels. Thanks
Id : manitzx pass : 123456

Code:
<item>
<title>i-Concerts HD</title>
<link>i-Concerts HD</title>
<thumbnail>http://cms.dmpcdn.com/livetv/2019/01/16/aa02422d-9a3a-4dd4-9e11-15bd219ed41e.png</thumbnail>
<link>$doregex[logout]$doregex[makelist]</link>
<regex>
<name>makelist</name>
  <listrepeat><![CDATA[
  <title>[COLOR aqua]i-Concerts HD[/COLOR]</title>
  <link>[makelist.param1]|Cookie=$get_cookies$&amp;User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0</link>
  <thumbnail>[makelist.param2]</thumbnail>
 ]]></listrepeat>
 <expres><![CDATA[(?s)url.*?'(htt.*?)'.*?image.*?'(htt.*?)']]></expres>
 <page>http://dootv.streaming-fast.com/THEOplayer/18jwLrlEKdn/</page>
 <referer>http://dootv.streaming-fast.com/Idoo8K/LIVE2.php</referer>
 <accept>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0</accept>
 <cookiejar>$get_cookies$</cookiejar>
</regex>
</item>
 
  • Like
Reactions: nipon0007

peterpan

Active member
Jul 7, 2013
117
84
28
@Download Here you go... You can put in your own login info (user name and password) in <rawpost>.........</rawpost>. Most LIVE channels won't open on the website. Also, I don't know how to encode/decode Thai characters in Kodi, but I'm sure omeone like @streamwatcher2013 or @gujal may be able to help you and even optimize the code for you :)



XML:
<item>
<title>i-Concerts HD **http://dootv.streaming-fast.com/Idoo8K/login**</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param3][/COLOR]</title>
<link>$doregex[PlayStream]|Cookie=$get_cookies$&amp;User-Agent=iPad</link>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[class="moviefilm"(?s).+?"location.href='(.*?)'.+?src="(.*?)".*?_under">(.*?)<]]></expres>
<page>http://dootv.streaming-fast.com/Idoo8K/$doregex[getSERVER]</page>
<referer>http://dootv.streaming-fast.com/Idoo8K/Idoo8K_apk.php</referer>
<cookieJar>$doregex[LoginAndCookie]</cookieJar>
</regex>

<regex>
<name>PlayStream</name>
<expres>"src": "(.*?)"</expres>
<page>[makelist.param1]</page>
<referer>http://dootv.streaming-fast.com/Idoo8K/$doregex[getSERVER]</referer>
<cookieJar>$doregex[LoginAndCookie]</cookieJar>
</regex>

<regex>
<name>getSERVER</name>
<expres>location.href='(.*?)'.*?live.png</expres>
<page>http://dootv.streaming-fast.com/Idoo8K/Idoo8K_apk.php</page>
<referer>http://dootv.streaming-fast.com/Idoo8K/login</referer>
<cookieJar>$doregex[LoginAndCookie]</cookieJar>
</regex>

<regex>
<name>LoginAndCookie</name>
<expres></expres>
<page>http://dootv.streaming-fast.com/Idoo8K/check_login.php</page>
<referer>http://dootv.streaming-fast.com/Idoo8K/login</referer>
<rawpost>txtUsername=layer&amp;txtPassword=lrpass</rawpost>
<cookieJar></cookieJar>
</regex>
</item>
 

tungbeng95

Member
Oct 25, 2018
386
13
18
I need help 2 regexs:
hxxps://www.afromotion.tv/afrotv/watch/cz & hxxps://www.tvr.by/plugines/online-tv-main.php?channel=tv&chan_id=bt24
 

peterpan

Active member
Jul 7, 2013
117
84
28
@tungbeng95
TV5 Monde is Google Captcha Protected :(
BT24 doesn't always play/open on the website, but here it is anyway...



XML:
<item>
<title>BT24 **www.tvr.by/plugines/online-tv-main.php?channel=tv&chan_id=bt24**</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=bt24</page>
<agent>iPad</agent>
<cookieJar></cookieJar>
</regex>
</item>
 
  • Like
Reactions: tungbeng95
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5