LSP Regex & Makelist Discussion.

travel01

New member
Apr 1, 2016
8
0
1
@gujal
vielen dank für deine mühe gujal, ich würde mich freuen, wenn du mir eine regex für einzelne sender 720p machen würdest.
 

gujal

Developer
Dec 26, 2013
590
326
63
Enjoy!

LSP XML:
<item>
<title>https://www.canlitv.vin/tv100-izle</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests, unwise
  seclink = re.findall('iframe.+?src="([^"]+)',page_data)[0]
  source = requests.get(seclink, headers={'user-agent':'Mozilla/5.0','referer':'https://www.canlitv.vin/'}).text
  while 'w,i,s,e' in source:
    source=unwise.unwise_process(source)
  link = re.findall("#kalite720.+?Video\('([^']+)",source, re.DOTALL)[0]
  return link
]]></expres>
<page>https://www.canlitv.vin/tv100-izle</page>
</regex>
</item>
 
  • Like
Reactions: travel01

boul

Member
Nov 24, 2017
36
0
6
hi @streamwatcher2013 please this regex stop to work. Thank to help

<item>
<Title>ustvgo.tv</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
link='https://ustvgo.tv/'+re.findall('(player.php[^\'"]+)',page_data)[0]
list=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://ustvgo.tv/abc-live-streaming-free/'}).content
source=re.findall('id=.player(?s)(.*?)</body',list)[0]
player=re.findall('file:\s*([^\(]+)',source)[0]
html_list,gtok,tok2=re.findall('(?s)%s.+?return.+?\]=([^\(]+).+?\)\+([^\]\[]+).+?\]\([\'"]([^\'"]+)'%player,source)[0]
tok=re.findall('%s.+?\[("[^\]]+)'%gtok,source)[0];token=''.join(eval(tok))
token2=re.findall('id=%s>([^<]+)'%tok2,list)[0]
ghtml=re.findall('case.+?:\s*return\s*"([^"]+)',re.findall('%s(?s)(.*?)\}\}'%html_list,source)[0])
return 'https://peer%s.ustv24h.live/ABC/myStream/playlist.m3u8?wmsAuthSign=%s%s|user-agent=ipad&referer=https://ustvgo.tv/'%(ghtml[8],token,token2)
]]></expres>
<page>https://ustvgo.tv/abc-live-streaming-free/</page>
<referer>https://ustvgo.tv/</referer>
</regex>
<thumbnail>http://channelpear.com/images/media/2730.jpg</thumbnail>
<fanart>http://channelpear.com/images/media/2730.jpg</fanart>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
They just made a little trick.

LSP XML code:
<item>
<title>ABC</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link='https://ustvgo.tv/'+re.findall('(player.php[^\'"]+)',page_data)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://ustvgo.tv/abc-live-streaming-free/'}).content
  player=re.findall('(?:source|file):\s*([^\(]+)',source)[0]
  html_list,gtok,tok2=re.findall('(?s)%s.+?return.+?\]=([^\(]+).+?\)\+([^\]\[]+).+?\]\([\'"]([^\'"]+)'%player,source)[0]
  tok=re.findall('%s.+?\[("[^\]]+)'%gtok,source)[0];token=''.join(eval(tok))
  token2=re.findall('id=%s>([^<]+)'%tok2,source)[0]
  ghtml=re.findall('case.+?:\s*return\s*"([^"]+)',re.findall('%s(?s)(.*?)\}\};var'%html_list,source)[0])
  return 'https://peer%s.ustv24h.live/ABC/myStream/playlist.m3u8?wmsAuthSign=%s%s|user-agent=ipad&origin=https://ustvgo.tv&referer=%s'%(ghtml[8],token,token2,link)
]]></expres>
<page>https://ustvgo.tv/abc-live-streaming-free/</page>
<referer>https://ustvgo.tv/</referer>
</regex>
<thumbnail>http://channelpear.com/images/media/2730.jpg</thumbnail>
<fanart>http://channelpear.com/images/media/2730.jpg</fanart>
</item>
 
  • Like
Reactions: Doom

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
@Doom. Here u go

LSP XML code:
<item>
<title>https://ustvgo.tv/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  return re.findall('href="([^"]+).>([^<]+)',re.findall('(?:"primary"|</h2|"entry-title")>(?s)(.*?)(?:"entry-footer"|</article)',page_data)[0])
]]></expres>
<page>https://ustvgo.tv/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  link='https://ustvgo.tv/'+re.findall('(player.php[^\'"]+)',page_data)[0]
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]'}).content
  player=re.findall('(?:source|file):\s*([^\(]+)',source)[0]
  html_list,gtok,tok2=re.findall('(?s)%s.+?return.+?\]=([^\(]+).+?\)\+([^\]\[]+).+?\]\([\'"]([^\'"]+)'%player,source)[0]
  tok=re.findall('%s.+?\[("[^\]]+)'%gtok,source)[0];token=''.join(eval(tok))
  token2=re.findall('id=%s>([^<]+)'%tok2,source)[0]
  ghtml=re.findall('case.+?:\s*return\s*"([^"]+)',re.findall('function\s*%s(?s)(.*?)\}\}'%html_list,source)[0])
  return 'https://peer%s.ustv24h.live/ABC/myStream/playlist.m3u8?wmsAuthSign=%s%s|user-agent=ipad&origin=https://ustvgo.tv&referer=%s'%(ghtml[8],token,token2,link)
]]></expres>
<page>[makelist.param1]</page>
<referer>https://ustvgo.tv/</referer>
</regex>
</item>
 
  • Like
Reactions: Doom

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
@Doom. Sorry my bad, too hurry doing copy and paste. Just replace the ABC in the return line with [makelist.param2]

LSP XML code:
  return 'https://peer%s.ustv24h.live/[makelist.param2]/myStream/playlist.m3u8?wmsAuthSign=%s%s|user-agent=ipad&origin=https://ustvgo.tv&referer=%s'%(ghtml[8],token,token2,link)
 
  • Like
Reactions: Doom

peterpan

Active member
Jul 7, 2013
117
84
28
@tungbeng95 It's b/ it's using a different code: Change these 2 lines and it should work :)

link = re.findall("file: '(.*?)'",source)[0]
<page>hxxps://www.canlitv.vin/bein-sports-haber</page>

 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
To get all may be this will handle it:

LSP XML code:
<item>
<title>Canli TV</title>
<link>$doregex[genre]</link>
<thumbnail>https://www.canlitv.vin/resim/logoyil.png</thumbnail>
<regex>
<name>genre</name>
  <listrepeat><![CDATA[
  <title>[COLOR gold][genre.param2][/COLOR]</title>
  <link>$doregex[channels]</link>
  <thumbnail>https://www.canlitv.vin/resim/logoyil.png</thumbnail>
]]></listrepeat>
<expres>href="([^"]+/kanallar/[^"]+)"\s*title="([^"]+)"</expres>
<page>https://www.canlitv.vin/</page>
</regex>
<regex>
<name>channels</name>
  <listrepeat><![CDATA[
  <title>[COLOR gold][channels.param2][/COLOR]</title>
  <link>$doregex[url]</link>
  <thumbnail>[channels.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[(?s)<li>\n<a\s*href="([^"]+)"\s*title="([^"]+)".+?src="([^"]+)]]></expres>
<page>[genre.param1]</page>
<referer>https://www.canlitv.vin/</referer>
</regex>
<regex>
<name>url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests, unwise
  link = re.findall('iframe.+?src="([^"]+)',page_data)[0]
  page_data = requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'[channels.param1]','accept':'*/*'}).content
  while 'w,i,s,e' in page_data:
      page_data = unwise.unwise_process(page_data)
  strurl,res = re.findall('file:\s*[\'"](.+?([^/]+).m3u8[^\'"]+)', page_data)[0]
  if '720"' in page_data:
     return strurl.replace(res,'%s720'%res)+'|user-agent=ipad&referer='+link
  elif '480"' in page_data:
     return strurl+'|user-agent=ipad&referer='+link
  elif '360"' in page_data:
     return strurl.replace(res,'%s360'%res)+'|user-agent=ipad&referer='+link
  else:
     return strurl+'|user-agent=ipad&referer='+link
]]></expres>
<page>[channels.param1]</page>
<referer>https://www.canlitv.vin/</referer>
</regex>
</item>
 

BymemoLee

Member
Apr 30, 2018
93
20
8
Can you help me complete the Makelist, masters.
Code:
https://jetfilmizle.live/
HTML:
<item>
<title>[COLOR white]JETFILMIZLE[/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param2][COLOR gold] [makelist.param4] [makelist.param5] [makelist.param6][/COLOR]</title>
<link>$doregex[getUrl]</link>
<thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re
  import requests
  url = 'https://jetfilmizle.live/page/{}'
  headers={'User-Agent': 'Mozilla/5.0', 'Referer': 'https://jetfilmizle.live/'}
  channels = []
  for i in range(1,6):
    html = requests.get(url.format(i), headers=headers).text.replace("&#038;","&").replace("&#8211;","-")
    channels += re.findall('(?s)<article\sclass="[^"]+"[\w\W]+?href="/([^"]+)".+?title="([^"]+)"[\w\W]+?img\ssrc="([^"]+)"[\w\W]+?class="puan_2">([^"]+)</span[\w\W]+?class="puan_1">([^"]+)</span[\w\W]+?class="dil">([^"]+)</div',html)
  return channels
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<listrepeat><![CDATA[
<title>[getUrl.param2]</title>
<link>$doregex[get-Url]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):#
   import re
   return re.findall('.+?href="([^"]+)"\sclass="post-page-numbers"><span>([^"]+)</span',re.findall('id="movie-s">(?s)(.*?)</section',page_data)[0])
]]></expres>
<page>https://jetfilmizle.live/[makelist.param1]</page>
<referer>https://jetfilmizle.live/[makelist.param1]</referer>
<cookieJar></cookieJar>
</regex>
<regex>
<name>get-URL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):#
   import requests
   import re
   headers = {'User-Agent':'Mozilla/5.0','Referer':'[getUrl.param1]','Origin':'https://jetfilmizle.live','Content-Type':'text/plain','Accept':'*/*','X-Requested-With':'XMLHttpRequest','X-isApp':'false'}
   source = requests.get('[getUrl.param1]',headers=headers).content

</--------------------???--------------------------/>

]]></expres>
<page></page>
<referer></referer>
</regex>
</item>
 

peterpan

Active member
Jul 7, 2013
117
84
28
@tungbeng95

Python:
<item>
<title>SPORTV **www.aovivo.club/assistir-sportv-ao-vivo-hd/**</title>
<link>https:$doregex[getURL]|user-agent=iPad</link>
<regex>
<name>getUNPACKED</name>
<expres>$pyFunction:get_unpacked(page_data,'(eval\(function\(p,a,c,k,e,d.*)')</expres>
<page>https://player.aovivo.club/channels/sportv</page>
<referer>https://www.tibiadown.com/rpg-frozen-indie-de-acao-de-sobrevivencia-indie-sera-lancado-no-steam-no-inicio-do-outono-mmos-com/</referer>
</regex>
<regex>
<name>getURL</name>
<expres>player.src(?s).+?(\/\/.*?)"</expres>
<page>$doregex[getUNPACKED]</page>
<referer></referer>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

peterpan

Active member
Jul 7, 2013
117
84
28
@tungbeng95 This one should get you most of the channels :)

XML:
<item>
<title>**https://www.aovivo.club/tvonline/**</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param3][/COLOR]</title>
<link>$doregex[getURL]</link>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres>(?s)blog-layout-1 row.+?href="(.*?)".+?src="(.*?)".+?"bookmark"&gt;(.*?)&lt;</expres>
<page>https://www.aovivo.club/tvonline/</page>
</regex>

<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests, jsunpack
  ChName = re.findall('https:.*?player.aovivo.club.channels\/(.*?)\/',page_data)[0]
  source = requests.get('https://player.aovivo.club/channels/'+ChName,headers={'user-agent':'Mozilla/5.0','referer':'https://www.aovivo.club/tvonline/','accept':'*/*'}).content
  while 'p,a,c,k,e,d' in source:
      source = jsunpack.unpack(source)
  strurl = re.findall('player.src(?s).+?src:"(.*?)"', source)[0]
  return 'https:'+strurl+'|user-agent=iPad&referer='+'https://player.aovivo.club/channels/'+ChName
]]></expres>
<page>[makelist.param1]</page>
<referer>https://www.aovivo.club/tvonline/</referer>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

Million

New member
Dec 9, 2018
24
1
3
I can't play video
@streamwatcher2013 Can you help me

LSP Code:
<item>
<title>Video</title>
<link>$doregex[makelist]</link>
<thumbnail>https://i.imgur.com/1y5hCPd.jpg</thumbnail>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param4]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  count=10;pn=1;data=[]
  while pn <= int(count):
    source=requests.get('https://ffmovies.ru/star/scott-adkins?page='+str(pn),headers={'user-agent':'Mozilla/5.0','referer':'https://ffmovies.ru/','accept':'*/*'}).content
    data +=re.findall('"item"\s*data-tip.+?tooltip/([^"]+).+?src="([^"]+).+?(film[^"]+).>([^<]+)',re.findall('"row movie-list">(?s)(.*?)pagi',source)[0]);pn +=1
  return data
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,time
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  ndate=int(time.time())
  source=requests.get('https://ffmovies.ru/ajax/film/servers/[makelist.param1]?ts=%s'%ndate,headers={'user-agent':'Mozilla/5.0','referer':'https://ffmovies.ru/[makelist.param3]','accept':'*/*'}).content.replace('\\','')
  IDs,tok,ref=re.findall('(?s)"iframe"\s*data-id="([^"]+).+?data-id="([^"]+).+?(film[^"]+)',source)[0]
  link='https://ffmovies.ru/ajax/episode/info?ts=%s&id=%s&server=%s'%(ndate,tok,IDs)  #&_=598  &_=694 
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://ffmovies.ru/%s'%ref,'x-requested-with':'XMLHttpRequest','accept':'*/*'}).content.replace('\\','')
  stream=re.findall('"target":"([^"]+)',source)[0]
  source=requests.get(stream,headers={'user-agent':'Mozilla/5.0','referer':'https://ffmovies.ru/%s'%ref,'accept':'*/*'}).content.replace('\\','')
  return re.findall('mediaSources.+?file":"([^"]+)',source)[0]+'|user-agent=ipad&referer=https://ffmovies.ru/%s'%stream
]]></expres>
<page>https://ffmovies.ru/[makelist.param3]</page>
<referer>https://ffmovies.ru/movies</referer>
</regex>
</item>
 

altug

Member
Jul 7, 2016
70
2
8

peterpan

Active member
Jul 7, 2013
117
84
28
Try this,.. it's working for most channels, but someone like @streamwatcher2013 or @gujal need to fix page retrieval code and utf-8 encoding, so you can get channels like "CNN Türk" :)

XML:
<item>
<title>https://www.kolaytv.biz/tr - Movies</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param3][/COLOR]</title>
  <link>$doregex[getLink]|User-Agent=iPad</link>
  <thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('class="thumbnail(?s).*?href="(.*?biz\/)(.*?)".*?title="(.*?) canlı".*?src="(.*?)"',re.findall('row clearfix ktv_other(?s)(.*?)row clearfix footer_top',page_data)[0].replace('&#8217;','\''))
  for pn in xrange(1,3):
    source=requests.get('https://www.kolaytv.biz/tr?sayfa='+str(pn),headers={'user-agent':'Mozilla/5.0','accept':'*/*'}).content.replace('#038;','').replace('&#8211;','-')
    list +=re.findall('class="thumbnail(?s).*?href="(.*?biz\/)(.*?)".*?title="(.*?) canlı".*?src="(.*?)"',re.findall('row clearfix ktv_other(?s)(.*?)row clearfix footer_top',page_data)[0].replace('&#8217;','\''))
  return list
]]></expres>
<page>https://www.kolaytv.biz/tr</page>
</regex>
<regex>
<name>getLink</name>
<expres>source src="(.*?)"</expres>
<page>https://www.kolaytv.biz/yayinim.php?kanal=[makelist.param2]</page>
<referer>https://www.kolaytv.biz/yayinim.php?kanal=[makelist.param2]</referer>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0</agent>
<cookieJar></cookieJar>
</regex>
</item>
 

tungbeng95

Member
Oct 25, 2018
391
15
18
@peterpan Check this, it's not working

<item>
<title>Bein Sports Haber</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
import re, requests, unwise
seclink = re.findall('iframe.+?src="([^"]+)',page_data)[0]
source = requests.get(seclink, headers={'user-agent':'Mozilla/5.0','referer':'https://www.canlitv.vin/'}).text
while 'w,i,s,e' in source:
source=unwise.unwise_process(source)
link = re.findall("file: '(.*?)'",source)[0]
return link
]]></expres>
<page>https://www.canlitv.vin/bein-sports-haber</page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
Those site 'kolaytv, canlitv' have the same layout in their code

LSP XML code:
<title>https://www.kolaytv.biz/tr - TV</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param3][/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  url='https://www.kolaytv.biz/tr?sayfa={}';lists=[]
  for p in range(1,3):
    source=requests.get(url.format(p),headers={'user-agent':'Mozilla/5.0','referer':'https://www.kolaytv.biz/tr','accept':'*/*'}).content.replace('#038;','').replace('&#8211;','-')
    lists +=re.findall('(?s)"thumbnail".+?src="([^"]+).+?h1>.+?href="([^"]+).+?>([^<]+)',re.findall('"row clearfix row_ktv">(?s)(.*?)pagi',source)[0])
  return lists
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  url=re.findall('(?:id=.video[\w\W]+?|<iframe.+?)src=[\'"]([^\'"]+)',page_data)[0]
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param2]','accept':'*/*'}).content.replace('#038;','').replace('&#8211;','-')
  return re.findall('<video[\w\W]*?(?:source|src|file)=[\'"]([^\'"]+)',source)[0]+'|user-agent=ipad&origin=https://www.kolaytv.biz&referer='+url
]]></expres>
<page>[makelist.param2]</page>
<referer>https://www.kolaytv.biz/tr</referer>
</regex>
<thumbnail>https://www.kolaytv.biz/images/logo.png</thumbnail>
</item>
 

vbprofi

Member
Feb 9, 2016
87
3
8
Hello dear friends,
sterk tv have change his website again. I try to create a makelist, but I don't get List of VideoItems. Only List items for Pagination alreddy work. please help to fix this code.
Code:
<item>
<title>[COLOR cyan]STÊRK - Bername[/COLOR] (für langsame Verbindung)</title>
<link>$doregex[makelist]</link>

<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>Seite [makelist.param1]</title>
<link>$doregex[main]</link>
]]></listrepeat>
<expres>'(.*?)'</expres>
<page>$doregex[zahl]</page>
</regex>

<regex>
<name>zahl</name>                                            
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 #max = re.findall("Next.*?</a><a href=.*?sterktv.net/category/berneme/page/(.*?)/'>Last.*?</a></div>", page_data)[0]
 max = re.findall('href="http://sterktv.net/kategori/berneme/page/2/">.*?page-numbers.*?href="http://sterktv.net/kategori/berneme/page/(.*?)/">', page_data)[0]

 liste = ""
 for i in xrange(1, int(max)+1):
  liste += "'" + str(i) + "'"

 return liste
]]></expres>
<page>http://sterktv.net/kategori/berneme/</page>
</regex>

<regex>
<name>main</name>
<listrepeat><![CDATA[
<title>[COLOR cyan] [main.param3] [/COLOR]</title>
<link>$doregex[play]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re, HTMLParser, sys
reload(sys)
sys.setdefaultencoding("utf-8")
def GetLSProData(page_data,Cookie_Jar,m):
 parser = HTMLParser.HTMLParser()
 s = re.sub("(&.+?;)", lambda m: parser.unescape(m.group()), page_data)
 return re.findall('href="(.*?)".*?data-src="(.*?)".*?bookmark">(.*?)</a></h2>', re.findall('</h1>(?s)(.*?)navigation pagination', s)[0])
]]></expres>
<page>http://sterktv.net/category/berneme/page/[makelist.param1]/</page>
<referer>http://sterktv.net/</referer>
<cookieJar></cookieJar>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0</agent>
</regex>
</item>
thank you very much
 

peterpan

Active member
Jul 7, 2013
117
84
28
Maybe not the shortest RegEx, but it works :) Enjoy!



XML:
<item>
<title>[COLOR cyan]STÊRK - Bername[/COLOR] (für langsame Verbindung)</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR lime]Seite - [makelist.param1][/COLOR]</title>
<link>$doregex[main]</link>
]]></listrepeat>
<expres>'(.*?)'</expres>
<page>$doregex[zahl]</page>
</regex>

<regex>
<name>zahl</name>                                           
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 max = re.findall('page-numbers dots.+?page\/(.*?)\/', page_data)[0]
 liste = ""
 for i in xrange(1, int(max)+1):
  liste += "'" + str(i) + "'"
 return liste
]]></expres>
<page>http://sterktv.net/kategori/berneme/</page>
</regex>

<regex>
<name>main</name>
<listrepeat><![CDATA[
<title>[COLOR gold][main.param4][/COLOR]</title>
<link>http://sterktv.net$doregex[play]</link>
<thumbnail>[main.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[penci-link-post.+?href="(.*?net)\/(.*?)\/".+?src="(.*?)"(?s).+?bookmark">(.*?)<]]></expres>
<page>http://sterktv.net/kategori/berneme/page/[makelist.param1]/</page>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0</agent>
<cookieJar></cookieJar>
</regex>

<regex>
<name>play</name>
<expres><![CDATA[source: '(.*?)']]></expres>
<page>[main.param1]/[main.param2]</page>
<referer>http://sterktv.net/kategori/berneme/</referer>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0</agent>
<cookieJar></cookieJar>
</regex>
</item>
 

vbprofi

Member
Feb 9, 2016
87
3
8
thank you for the help and the solution. But I have the same problem with your code. after the list for pagination I get no Items for videos. I get empty list and no errors in log. Is cloudflare somewhere in between again?
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
@vbprofit Try the little bit difference tweak

LSP XML code:
<item>
<title>[COLOR cyan]STÊRK - Bername[/COLOR] (für langsame Verbindung)</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR lime]Seite - [makelist.param1][/COLOR]</title>
  <link>$doregex[main]</link>
]]></listrepeat>
<expres>'(.*?)'</expres>
<page>$doregex[zahl]</page>
</regex>
<regex>
<name>zahl</name>                                           
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 max = re.findall('page-numbers dots.+?page\/(.*?)\/', page_data)[0]
 liste = ''
 for i in xrange(1, int(max)+1):
  liste += '\'' + str(i) + '\''
 return liste
]]></expres>
<page>http://sterktv.net/kategori/berneme/</page>
</regex>
<regex>
<name>main</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][main.param3][/COLOR]</title>
  <link>$doregex[play]</link>
  <thumbnail>[main.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 return re.findall('(?s)data-src="([^"]+).+?"entry-title".+?href="([^"]+).+?>([^<]+)',re.findall('Bername</h1>(?s)(.*?)pagi',page_data)[0])
]]></expres>
<page>http://sterktv.net/kategori/berneme/page/[makelist.param1]/</page>
<referer>http://sterktv.net/kategori/berneme/</referer>
</regex>
<regex>
<name>play</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 stream=re.findall('(?:P|p)layer[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)',page_data)[0]
 if 'http' in stream:
    return '%s|user-agent=ipad'%stream
 else:
    return 'http://sterktv.net%s|user-agent=ipad'%stream
]]></expres>
<page>[main.param2]</page>
<referer>http://sterktv.net/kategori/berneme/</referer>
</regex>
</item>
 
  • Like
Reactions: vbprofi

peterpan

Active member
Jul 7, 2013
117
84
28
@tungbeng95 Not sure if this is what you want...



XML:
<item>
<title>Sport_us - https://limehd.tv/sport_uz</title>
<link>$doregex[getM3U8]|User-Agent=iPad</link>
<regex>
<name>getM3U8</name>
<expres><![CDATA[(h.*?.*?sport_uz.*?m3u8)']]></expres>
<page>https://limehd.tv/sport_uz</page>
</regex>
</item>

################################

<item>
<title>Several Channels- https://limehd.tv/sport_uz</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR lime][makelist.param1][/COLOR]</title>
<link>[makelist.param2]|User-Agent=iPad</link>
<thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[(?s)title="(.*?)"(?s).+?'(h.*?)'.+?src="(.*?)"]]></expres>
<page>https://limehd.tv/sport_uz</page>
</regex>
</item>
 

boomski2

Member
Aug 19, 2019
45
1
8
Hola amigos.

anyone know how to play this link
Code:
https://drive.google.com/file/d/0BzFQ3I70b9pSNkZ5cmRicXlXbDg/view
before this im using this link but now its not work

Code:
<item>
<title>Viu</title>
<thumbnail></thumbnail>
<link>$doregex[url]|Cookie=$get_cookies$</link>
<regex>
<name>url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
    import re
    fmturl = re.findall(',\[\"fmt_list\D+([0-9][0-9])[\w\W\s]*?url_encoded_fmt_stream_map', page_data)[0]
    strurl = re.findall(str(fmturl) + '\|([^\|]+.videoplayback[^\,]+)', page_data)[0].replace('\\u0026', '&').replace('\\u003d', '=')
    return strurl
]]></expres>
<page>https://drive.google.com/file/d/0BzFQ3I70b9pSNkZ5cmRicXlXbDg/view</page>
<cookieJar></cookieJar>
</regex>
</item>
 

peterpan

Active member
Jul 7, 2013
117
84
28
@boomski2 Try this



XML:
<item>
<title>Viu</title>
<thumbnail></thumbnail>
<link>$doregex[url]|Cookie=$get_cookies$</link>
<regex>
<name>url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
    import re
    fmturl = re.findall('fmt_stream_map","18\|(.*?)"', page_data)[0].replace('\\u0026', '&').replace('\\u003d', '=')
    return fmturl
]]></expres>
<page>https://drive.google.com/file/d/0BzFQ3I70b9pSNkZ5cmRicXlXbDg/view</page>
<cookieJar></cookieJar>
</regex>
</item>
 

DarkSky

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

Code:
https://www.canlitv.today/cartoon-network
 

peterpan

Active member
Jul 7, 2013
117
84
28
@DarkSky Trty this...

XML:
<item>
<title>**https://www.canlitv.today/cartoon-network**</title>
<link>$doregex[getLink]|User-Agent=iPad</link>
<regex>
<name>getLink</name>
<expres>source src="(.*?)"</expres>
<page>https://www.canlitv.today/yayinim.php?kanal=cartoon-network</page>
<referer>https://www.canlitv.today/cartoon-network</referer>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0</agent>
<cookieJar></cookieJar>
</regex>
</item>
 
  • Like
Reactions: altug and DarkSky

peterpan

Active member
Jul 7, 2013
117
84
28
@vbprofi It's still working over here. I get videos from each page and they all seem to be working fine. No idea what it isn't working on your end!

 

peterpan

Active member
Jul 7, 2013
117
84
28
@tungbeng95 this should work...

XML:
<item>
<title>Bein Sports Haber</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import re, requests, unwise
 seclink = re.findall('iframe.+?src="([^"]+)',page_data)[0]
 source = requests.get(seclink, headers={'user-agent':'Mozilla/5.0','referer':'https://www.canlitv.vin/'}).text
 while 'w,i,s,e' in source:
   source=unwise.unwise_process(source)
 link = re.findall('source src="(.*?)"',source)[0]
 return link
]]></expres>
<page>https://www.canlitv.vin/bein-sports-haber</page>
</regex>
</item>
 

Doom

Member
Sep 16, 2019
321
21
18

tungbeng95

Member
Oct 25, 2018
391
15
18
@peterpan can you help me complete this makelist of:
hxxp://de-tv-live.blogspot.com/
 

peterpan

Active member
Jul 7, 2013
117
84
28
@tungbeng95 I can easily retrieve the channels and their respective 'qw' id, but the site doesn't use consistent code for all channels. I think they can be coded with if/else statements, but I'm not good at that :( Maybe @streamwatcher2013 or @gujal can chime in :) Anyway, here's ZDF HD for you, but nfortunately right now there's no audio, maybe they'll fix that later...


XML:
<item>
<title>ZDF TV</title>
<link>$doregex[getUrl]|user-agent-iPad</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
 url = re.findall('var newSrc ="(.*?)"',page_data)[0]+'21.html'
 source = requests.get(url,headers={'user-agent':'Mozilla/5.0'}).text
 return re.findall("xurl=atob\('(.*?)'",source)[0].decode('base64')
]]></expres>
<page>http://de-tv-live.blogspot.com/p/tv-kanale.html</page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
All the other channels driven by Google Recaptcha. Info is below

Source code:
SIXX

https://www.de24.live//embed/sixx-live
POST //embed/sixx-live HTTP/1.1
Host: www.de24.live
Connection: keep-alive
Content-Length: 448
Accept: */*
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Origin: https://www.de24.live
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://www.de24.live//embed/sixx-live
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: ads=1; _ga=GA1.2.1916356246.1591104496; _gid=GA1.2.1456385432.1591104496; _gat_gtag_UA_44546627_89=1

hash=%2B9S%2BH2FsAMaRnk3yu%2BJ%2F3V0nSE4DTEpRfPUtBUcC2dA%3D&e=03AGdBq27wMhX-_r_M89rR2qT67P746DJ7bvqaGg31EyLvMm2_4ocu1yDulP786fh-w1H8fRiE5elBpb0k9NVYKL8WMGmfTyUQMxe1f3sQbVS_qLMwUMMEM9YKQdZk8pRqzSr0Gz73Dkucppzp2yVCGO0Ni8Fdv-763f35xEYeKkcSB9brs_p8dusBR8KVZzrbqkf16Y3M59fOSmpFqq3noiE9RRbGrCC7FfmSvQzSKHq5NfOauZaHQBsrc_OB9j7aujdySfKoiPI_lxExuWOVD577SQm0xKPZZXzH0q8MVRdbOoq9icdTcQqPcyCVUhXAUdfRa1jOdDwpcEXEwDvQ9sBugwsV0mV84xAfyg5nFvRW47Yy0bGHuuo&id=11716

this will feed from google
e=03AGdBq27wMhX-_r_M89rR2qT67P746DJ7bvqaGg31EyLvMm2_4ocu1yDulP786fh-w1H8fRiE5elBpb0k9NVYKL8WMGmfTyUQMxe1f3sQbVS_qLMwUMMEM9YKQdZk8pRqzSr0Gz73Dkucppzp2yVCGO0Ni8Fdv-763f35xEYeKkcSB9brs_p8dusBR8KVZzrbqkf16Y3M59fOSmpFqq3noiE9RRbGrCC7FfmSvQzSKHq5NfOauZaHQBsrc_OB9j7aujdySfKoiPI_lxExuWOVD577SQm0xKPZZXzH0q8MVRdbOoq9icdTcQqPcyCVUhXAUdfRa1jOdDwpcEXEwDvQ9sBugwsV0mV84xAfyg5nFvRW47Yy0bGHuuo

Same as

https://www.de24.live//embed/pro7-live
POST //embed/pro7-live HTTP/1.1
Host: www.de24.live
Connection: keep-alive
Content-Length: 467
Accept: */*
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Origin: https://www.de24.live
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://www.de24.live//embed/pro7-live
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: _ga=GA1.2.1916356246.1591104496; _gid=GA1.2.1456385432.1591104496; ads=2; _gat_gtag_UA_44546627_89=1

hash=WmuFjusu9ZNnLWbo0b%2Bh%2FZdsPtSVo%2FQ2uCErUKMJLWI%3D&e=03AGdBq24x9LWtkfLV6i_u3-EnodKJXOl5gJe9fYBzY3v8bVURWPWVwOh7yxTTjO-9lty7tIYyRK45qqJs88uOE_z-X07lLKqWSYMcH1M4smPVeOeSnDRiS_6KAL9YNQ2Mm7f5-abfwEpH9hSdKevLLF-0QnG_wr3obvkDWsEnDoqFoHU7Vd_XJ7O3HaWyAMBq8R71Sjq-J5egkV8TJz6TqbzHBqaSDylUDTIi9Owc46vO84HDWjadCfdfD9bt3kdKB5UbHXtXKoN46BIoGhj5OFiLNT1-G0JBzY9k2E_v6CBcaZkclbeRovws2w0-_NHhyz5f8pe31gY2EJk29BLKt-1kO47qMZ2wdhsyPRxcr9KJzcYOAehYK8sLIwSinF4yuvIhuGfVDOxp&id=10695

e=03AGdBq24x9LWtkfLV6i_u3-EnodKJXOl5gJe9fYBzY3v8bVURWPWVwOh7yxTTjO-9lty7tIYyRK45qqJs88uOE_z-X07lLKqWSYMcH1M4smPVeOeSnDRiS_6KAL9YNQ2Mm7f5-abfwEpH9hSdKevLLF-0QnG_wr3obvkDWsEnDoqFoHU7Vd_XJ7O3HaWyAMBq8R71Sjq-J5egkV8TJz6TqbzHBqaSDylUDTIi9Owc46vO84HDWjadCfdfD9bt3kdKB5UbHXtXKoN46BIoGhj5OFiLNT1-G0JBzY9k2E_v6CBcaZkclbeRovws2w0-_NHhyz5f8pe31gY2EJk29BLKt-1kO47qMZ2wdhsyPRxcr9KJzcYOAehYK8sLIwSinF4yuvIhuGfVDOxp

https://www.google.com/recaptcha/api2/reload?k=6LeII50UAAAAAA5jiKIwKnJ_iDc9uVuc7qzYi8-_
["rresp","03AGdBq24x9LWtkfLV6i_u3-EnodKJXOl5gJe9fYBzY3v8bVURWPWVwOh7yxTTjO-9lty7tIYyRK45qqJs88uOE_z-X07lLKqWSYMcH1M4smPVeOeSnDRiS_6KAL9YNQ2Mm7f5-abfwEpH9hSdKevLLF-0QnG_wr3obvkDWsEnDoqFoHU7Vd_XJ7O3HaWyAMBq8R71Sjq-J5egkV8TJz6TqbzHBqaSDylUDTIi9Owc46vO84HDWjadCfdfD9bt3kdKB5UbHXtXKoN46BIoGhj5OFiLNT1-G0JBzY9k2E_v6CBcaZkclbeRovws2w0-_NHhyz5f8pe31gY2EJk29BLKt-1kO47qMZ2wdhsyPRxcr9KJzcYOAehYK8sLIwSinF4yuvIhuGfVDOxp",null,120,null,null,null
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
@tungbeng95

Try this:

LSP XML code:
<item>
<title>http://de-tv-live.blogspot.com/p/tv-kanale.html</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2][/COLOR]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[newSrc.[\'"]([^\'"]+)[\w\W]*?title".*\n.*?(\w[^\n]+)]]></expres>
<page>http://de-tv-live.blogspot.com/p/tv-kanale.html</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,xbmcgui
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  if 'atob' in page_data:
     return re.findall('atob.[\'"]([^\'"]+)',page_data)[0].decode('base64')+'|user-agent=ipad&referer=http://s1-tv.blogspot.com/p/4[makelist.param1]'
  else:
     l1="Protected by Google Re-Captcha - streamwatcher2013"
     l2="Channel is not viewable!"
     return xbmcgui.Dialog().ok(l1,l2)
]]></expres>
<page>http://s1-tv.blogspot.com/p/4[makelist.param1]</page>
<referer>http://de-tv-live.blogspot.com/p/tv-kanale.html</referer>
</regex>
</item>
 
  • Like
Reactions: tungbeng95
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5