LSP Regex & Makelist Discussion.

altug

Member
Jul 7, 2016
70
2
8
Unfortunately, that doesn't work.What do I have to change for it to work again?

<item>
<title>ÇUKUR</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR yellow][makelist.param3][/COLOR]</title>
<link>$doregex[makelist2]</link>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[(?s)box-info-type-3".+?"/(.*?)".+?src="(.*?)".+?title">([^<]+)]]></expres>
<page>https://www.showtv.com.tr/dizi/tum_bolumler/cukur-sezon-1-bolum-1-izle/44178</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
<title>[COLOR dodgerblue]Episode [makelist2.param1][/COLOR] - [COLOR yellow][makelist.param3][/COLOR]</title>
<link>$doregex[getUrl]</link>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data, Cookie_Jar, m):
if '"video-part"' in page_data:
list=re.findall('video-part-name">(?s)(.*?)</ul',page_data)[0]
title=re.findall('href.+?>(\d+)<',list);link=re.findall('href="/([^"]+)',list)
return zip(title,link)
elif '"video-part"' not in page_data:
list=re.findall('"TVEpisode"(?s)(.*?)</script',page_data)[0].replace('\\','')
return re.findall('"episodeNumber":"([^"]+)".+?url".+?.tr/([^"]+)',list)
]]></expres>
<page>https://www.showtv.com.tr/[makelist.param1]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
list=re.findall('"ht_files"(?s)(.*?)<script', page_data)[0].replace('\\', '')
if '1080' in list:
return re.findall('"name":"1080"."file":"([^"]+)', list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
elif '720' in list:
return re.findall('"name":"720"."file":"([^"]+)',list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
elif 'ht_mobile' in list:
return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
else:
return re.findall('"Standart","file":"([^"]+)',list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
]]></expres>
<page>https://www.showtv.com.tr/[makelist2.param2]</page>
</regex>
<thumbnail>https://mo.ciner.com.tr/showtv/iu/300x200/cukur.jpg?v=1549316841</thumbnail>
</item>
 

mustafa19554

Guest
May 17, 2016
28
3
3
Code:
Buyur Bunu Dene :  ( Son 10 Bölüm )

<item>

<title> CUKUR </ title>

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

<regex>

<Name> Makelliste </ Name>

<listrepeat> <! [CDATA [

  <title> [COLOR gelb] [makelist.param3] [/ COLOR] </ title>

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

  <thumbnail> [makelist.param2] </ thumbnail>

  <info> [makelist.param4] </ info>

]]> </ listrepeat>

<Ausdruck> <! [CDATA [(? s) class = "box box-xs-12". +? a \ s * href = "/ ([^"] +). +? data-src = "([ ^ "] +). +?" title "> ([^ <] +). +?" description "> ([^ <] +)]]> </ expression>

<page> https://www.showtv.com.tr/dizi/tanitim/cukur/2076 </ page>

</ regex>

<regex>

<name> getUrl </ name>

<Ausdruck> <! [CDATA [# $ pyFunction

Import re, Anfragen

def GetLSProData (page_data, Cookie_Jar, m):

  list = re.findall ('"ht _ (?: video_id | embedded_link)" (? s) (. *?) <script', page_data) [0] .replace ('\\', '')

  fm3u8 = re.findall ('"ht_files" :. +? file ":" ([^ "] +)', Liste) [0]

  wenn '"1080' in der Liste:

    return fm3u8.replace ('.m3u8', '_ 1920x1080.mp4') + '| user-agent = ipad & referer = https: //www.showtv.com.tr/ [makelist.param1]'

  elif '"720' in der Liste:

    return fm3u8.replace ('.m3u8', '_ 1280x720.mp4') + '| user-agent = ipad & referer = https: //www.showtv.com.tr/ [makelist.param1]'

  elif 'ht_mobile' in Liste:

    return re.findall ('"ht_mobile_m3u8": "([^"] +)', Liste) [0] + '| user-agent = ipad & referer = https: //www.showtv.com.tr/ [makelist.param1 ] '

  sonst:

    source = request.get (fm3u8, headers = {'user-agent': 'Mozilla / 5.0', 'referer': 'https: //www.showtv.com.tr/ [makelist.param1]'}) .content

    m3u8 = fm3u8 [: 42]

    wenn 'x1080' in der Quelle:

       return m3u8 + re.findall ('x1080. * \ n (. *)', Quelle) [0] + '| user-agent = ipad & referer = https: //www.showtv.com.tr/ [makelist.param1] '

    elif 'x720' in der Quelle:

       return m3u8 + re.findall ('x720. * \ n (. *)', Quelle) [0] + '| user-agent = ipad & referer = https: //www.showtv.com.tr/ [makelist.param1] '

    sonst:

       return m3u8 + re.findall ('x480. * \ n (. *)', Quelle) [0] + '| user-agent = ipad & referer = https: //www.showtv.com.tr/ [makelist.param1] '

]]> </ Ausdruck>

<page> https://www.showtv.com.tr/[makelist.param1] </ page>

<Referer> https://www.showtv.com.tr/dizi/tanitim/cukur/2076 </ referer>

</ regex>

<thumbnail> https://i2.milimaj.com/i/milliyet/75/0x0/5e8af29badcdeb1ff03fe422.jpg </ thumbnail>

</ item>
 
Last edited by a moderator:

mustafa19554

Guest
May 17, 2016
28
3
3
Sorry that was German, now English .

Code:
<item>

<title> CUKUR </title>

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

<regex>

<name>makelist</name>

<listrepeat><![CDATA[

  <title>[COLOR yellow][makelist.param3][/COLOR]</title>

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

  <thumbnail>[makelist.param2]</thumbnail>

  <info>[makelist.param4]</info>

]]></listrepeat>

<expres><![CDATA[(?s)class="box box-xs-12".+?a\s*href="/([^"]+).+?data-src="([^"]+).+?"title">([^<]+).+?"description">([^<]+)]]></expres>

<page>https://www.showtv.com.tr/dizi/tanitim/cukur/2076</page>

</regex>

<regex>

<name>getUrl</name>

<expres><![CDATA[#$pyFunction

import re,requests

def GetLSProData(page_data,Cookie_Jar,m):

  list=re.findall('"ht_(?:video_id|embed_link)"(?s)(.*?)<script',page_data)[0].replace('\\','')

  fm3u8=re.findall('"ht_files":.+?file":"([^"]+)',list)[0]

  if '"1080' in list:

    return fm3u8.replace('.m3u8','_1920x1080.mp4')+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'

  elif '"720' in list:

    return fm3u8.replace('.m3u8','_1280x720.mp4')+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'

  elif 'ht_mobile' in list:

    return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0]+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'

  else:

    source=requests.get(fm3u8,headers={'user-agent':'Mozilla/5.0','referer':'https://www.showtv.com.tr/[makelist.param1]'}).content

    m3u8=fm3u8[:42]

    if 'x1080' in source:

       return m3u8+re.findall('x1080.*\n(.*)',source)[0]+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'

    elif 'x720' in source:

       return m3u8+re.findall('x720.*\n(.*)',source)[0]+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'

    else:

       return m3u8+re.findall('x480.*\n(.*)',source)[0]+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'

]]></expres>

<page>https://www.showtv.com.tr/[makelist.param1]</page>

<referer>https://www.showtv.com.tr/dizi/tanitim/cukur/2076</referer>

</regex>

<thumbnail>https://i2.milimaj.com/i/milliyet/75/0x0/5e8af29badcdeb1ff03fe422.jpg</thumbnail>

</item>
 
Last edited by a moderator:

mustafa19554

Guest
May 17, 2016
28
3
3
It happens when copying, I try that way .


<item>
<title>[COLOR lime]CUKUR[/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR yellow][makelist.param3][/COLOR]</title>
<link>$doregex[getUrl]</link>
<thumbnail>[makelist.param2]</thumbnail>
<info>[makelist.param4]</info>
]]></listrepeat>
<expres><![CDATA[(?s)class="box box-xs-12".+?a\s*href="/([^"]+).+?data-src="([^"]+).+?"title">([^<]+).+?"description">([^<]+)]]></expres>
<page>https://www.showtv.com.tr/dizi/tanitim/cukur/2076</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
list=re.findall('"ht_(?:video_id|embed_link)"(?s)(.*?)<script',page_data)[0].replace('\\','')
fm3u8=re.findall('"ht_files":.+?file":"([^"]+)',list)[0]
if '"1080' in list:
return fm3u8.replace('.m3u8','_1920x1080.mp4')+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'
elif '"720' in list:
return fm3u8.replace('.m3u8','_1280x720.mp4')+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'
elif 'ht_mobile' in list:
return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0]+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'
else:
source=requests.get(fm3u8,headers={'user-agent':'Mozilla/5.0','referer':'https://www.showtv.com.tr/[makelist.param1]'}).content
m3u8=fm3u8[:42]
if 'x1080' in source:
return m3u8+re.findall('x1080.*\n(.*)',source)[0]+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'
elif 'x720' in source:
return m3u8+re.findall('x720.*\n(.*)',source)[0]+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'
else:
return m3u8+re.findall('x480.*\n(.*)',source)[0]+'|user-agent=ipad&referer=https://www.showtv.com.tr/[makelist.param1]'
]]></expres>
<page>https://www.showtv.com.tr/[makelist.param1]</page>
<referer>https://www.showtv.com.tr/dizi/tanitim/cukur/2076</referer>
</regex>
<thumbnail>https://i2.milimaj.com/i/milliyet/75/0x0/5e8af29badcdeb1ff03fe422.jpg</thumbnail>
</item>
 

BymemoLee

Member
Apr 30, 2018
93
20
8
Bunu denermisin @altug

XML:
<item>
<title>[B][COLOR white]ÇUKUR[/COLOR][/B]</title>
<link>$doregex[encodeURL]</link>
<regex>
<name>encodeURL</name>
<listrepeat><![CDATA[
<title>[COLOR gold][encodeURL.param2][/COLOR]</title>
<link>$doregex[makelist2]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('data-href="/([^"]+)".+?>([^"]+)</option',re.findall('id="select_episode">(?s)(.*)</select>',page_data)[0])
]]></expres>
<page>https://www.showtv.com.tr/dizi/tanitim/cukur/2076</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
<title>[COLOR gold][encodeURL.param2] ([makelist2.param1]. Part)[/COLOR]</title>
<link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 if '"video-part"' in page_data:
   list=re.findall('video-part-name">(?s)(.*?)</ul',page_data)[0].replace('\/','/')
   title=re.findall('href.+?>(\d+)<',list);link=re.findall('href="/([^"]+)',list)
   return zip(title,link)
 elif '"video-part"' not in page_data:
   list=re.findall('"TVEpisode"(?s)(.*?)</script',page_data)[0].replace('\/','/')
   return re.findall('"episodeNumber":"([^"]+)".*?url".*?.tr/([^"]+)',list)
]]></expres>
<page>https://www.showtv.com.tr/[encodeURL.param1]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('"ht_files"(?s)(.*?)<script',page_data)[0].replace('\/','/')
  return re.findall('"name":"720"."file":"([^"]+)',list)[0]+'|Referer=https://www.showtv.com.tr/[makelist2.param2]'
]]></expres>
<page>https://www.showtv.com.tr/[makelist2.param2]</page>
<referer>https://www.showtv.com.tr/[makelist2.param2]</referer>
<agent>Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Mobile Safari/537.36</agent>
<cookieJar></cookieJar>
</regex>
<thumbnail>https://mo.ciner.com.tr/showtv/iu/1366x766/cukur.jpg</thumbnail>
</item>
 
  • Like
Reactions: altug

altug

Member
Jul 7, 2016
70
2
8
  • [USER = 71297] TRC4 [/ USER]
  • Samstag um 18.19 Uhr
TE QIFSHA CEKURIN EDHE JEVGJIT E TURQISE

Why did you write that and what do you want to achieve?
I would be careful with such statements
 

altug

Member
Jul 7, 2016
70
2
8
Unfortunately, that doesn't work.What do I have to change for it to work again?
<item>
<title>SPORİZLE</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param2][/COLOR]</title>
<link>$doregex[getUrl]</link>
<thumbnail>https://www.sporizle1.pw/[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; W…) Gecko/20100101 Firefox/62.0','Referer':'https://www.sporizle1.pw/'}
source=requests.get('https://www.sporizle1.pw/',headers=headers).content
list=re.findall('data-lang="KANALLAR"(?s)(.*?)class="col-md-24"',source)[0]
return re.findall('(?s)href="/.+?/.+?/(.*?)".title="(.*?)\s*Can.+?".+?src="/([^"]+)',list)
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
def GetLSProData(page_data,Cookie_Jar,m):
inf=re.findall('(?:watch|play)\("([^"]+)","([^"]+)"',page_data)[0]
source=requests.post('https://www.sporizle1.pw/embed/[makelist.param1]?web',headers={'Referer':'https://www.sporizle1.pw/embed/[makelist.param1]?web','User-Agent':'Mozilla/5.0'},data={'hash':inf[0],'id':inf[1], 'e': '2147483686'}).text
if '/' in source:
return base64.b64decode(re.findall('(.*)',source)[0][::-1]+'==')+'|User-Agent=Mozilla/5.0 (X11 Linux i686 rv:42.0) Gecko/20100101 Firefox/42.0 Iceweasel/42.0&Origin=https://www.sporizle1.pw&Referer=https://www.sporizle1.pw/embed/[makelist.param1]?web'
else:
return base64.b64decode(re.findall('(.*)',source)[0][::-1].replace('_','/')+'==')+'|User-Agent=Mozilla/5.0 (X11 Linux i686 rv:42.0) Gecko/20100101 Firefox/42.0 Iceweasel/42.0&Origin=https://www.sporizle1.pw&Referer=https://www.sporizle1.pw/embed/[makelist.param1]?web'
]]></expres>
<page>https://www.sporizle1.pw/embed/[makelist.param1]?web</page>
<referer>https://www.sporizle1.pw/embed/[makelist.param1]?web</referer>
<agent>Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.70 Mobile/13C71 Safari/601.1.46</agent>
<accept>*/*;q=0.8</accept>
<cookieJar></cookieJar>
</regex>
</item>
 

BymemoLee

Member
Apr 30, 2018
93
20
8
XML:
data={'hash':inf[0],'id':inf[1], 'e': '[COLOR=rgb(226, 80, 65)]2147483686[/COLOR]'}).text
Kırmızı ile boyalı kısımdaki rakamlar değişkenlik arzediyor, o yüzden süresiz yayın biraz zor gibi.
 

thundere

New member
Jan 30, 2021
1
0
1
In Turkvod plays this codes

host = re.findall('(https?://[^/]+)/', url)[0]
headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0'}
req = Request(url,None,headers)
response = urlopen(req)
html = response.read()
response.close()
if PY3:
html = to_utf8(html)
id = re.findall('data-i="(\d+)"', html, re.IGNORECASE)[0]
url2 = host+"/cdn/js/ads.php?"+id+"&undefined"
req = Request(url2,None,headers)
response = urlopen(req)
html = response.read()
response.close()
if PY3:
html = to_utf8(html)
e, sec = re.findall('e:\'([^\']+)\',sec:"([^"]+)"', html, re.IGNORECASE)[0]
url = url + "?web="
data = Urlencode({'e': e , 'sec': sec , 'id': id})
if PY3:
data = data.encode('ascii')
req = Request(url, data, headers)
response = urlopen(req)
link = response.read()
response.close()
link1 = link [::-1]
#link1 = link1.replace('_','=') + '=='
#first64, second64 = re.findall('(.*?=)(.*?==)', link1, re.IGNORECASE)[0]
#son_url1 = base64.b64decode(first64)+'?'+base64.b64decode(second64)
son_url1 = decode_base64(link1)
Header = '#User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0'
son_url = son_url1 + Header
except Exception as ex:
 

Doom

Member
Sep 16, 2019
321
21
18
stopped working can someone take a look & thanks

<item>
<title>A & E</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
from resolveurl.plugins.lib import jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
link=re.findall('class="video.+?src="([^"]+)',page_data)[0];link='https:'+link if link.startswith('//') else link
headers={'user-agent':'ipad','referer':'https://adictosalatele.com/canal-ae-en-vivo-online-gratis/','accept':'*/*'}
source=requests.get(link,headers=headers).content;url=re.findall('iframe.+?src="([^"]+)',source)[0]
source=requests.get(url,headers={'user-agent':'ipad','referer':link,'accept':'*/*'}).content
unpacked=jsunpack.unpack(re.findall('(eval.*m3u8.*)',source)[0]).replace('\\','')
return re.findall('source:[\'"]([^\'"]+)',unpacked)[0]+'|user-agent=ipad&referer='+url
]]></expres>
<page>https://adictosalatele.com/canal-ae-en-vivo-online-gratis/</page>
</regex>
<thumbnail></thumbnail>
</item>
 

umonkey

Member
Sep 18, 2012
70
0
6
can anyone help with this page:
Code:
hxxps://fullmatchsports.co/
thanks
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
Try this. Removed the server#3. Google for new cloudflarescrape

LSP XML:
<item>
<title>https://fullmatchsports.co/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,cloudscraper
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  scraper=cloudscraper.create_scraper()
  headers={'user-agent':'Mozilla/5.0','accept':'*/*'}
  source=scraper.get('https://fullmatchsports.co/',headers=headers).content
  data=re.findall('"content-thumbnail".+?href="([^"]+).+?:\s*(.*?)\s*Full.+?src="([^"]+)',re.findall('id="post-75166(?s)(.*?)<ul\s*class=.page-numbers',source)[0])
  for pn in range(2,11):
     pages='https://fullmatchsports.co/page/'+str(pn)+'/'
     source=scraper.get(pages,headers=headers).content
     data +=re.findall('"content-thumbnail".+?href="([^"]+).+?:\s*(.*?)\s*Full.+?src="([^"]+)',source)
  return data
]]></expres>
<page></page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[makelist2.param2]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,cloudscraper
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  scraper=cloudscraper.create_scraper()
  source=scraper.get('[makelist.param1]',headers={'user-agent':'Mozilla/5.0','referer':'https://fullmatchsports.co/'}).content
  return re.findall('"tab-title.+?href="\?tab=(?!server3)([^"]+).>(?!L)([^<]+)',re.findall('class="streaming">(?s)(.*?)class="tab-content',source)[0])
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,urllib,jsunpack,cloudscraper,urlresolver
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  scraper=cloudscraper.create_scraper();ref='[makelist.param1]?tab=[makelist2.param1]'
  source=scraper.get(ref,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]'}).content
  link,host=re.findall('"iframe-container".+?src="((.*?)/em[^"]+)',source)[0]
  s=scraper.get(link,headers={'user-agent':'Mozilla/5.0','referer':ref})
  if 'fullmatchsports' not in link:
    textlink,tok=re.findall('"videoUrl":"([^"]+).,"videoServer":"(\d+)',s.content.replace('\\',''))[0];txtlink='%s%s?s=%s&d='%(host,textlink,int(tok))
    source=scraper.get(txtlink,headers={'user-agent':'Mozilla/5.0','referer':link,'accept':'*/*'},cookies=s.cookies).content
    if '1280' in source:
       return re.findall('1280.*\n(.*)',source)[0]+'|user-agent=ipad&referer=%s'%txtlink
    else:
       return re.findall('640.*\n(.*)',source)[0]+'|user-agent=ipad&referer=%s'%txtlink
  else:
    data=jsunpack.unpack(re.findall('(eval.*)',s.content)[0]).replace('\\','')
    if 'm38' in data:
       return re.findall('player[\w\W]*?(?:source|src|file)":\s*[\'"]([^\'"]+)',data)[0]+'|user-agent=ipad&referer=%s'%link
    else:
       return urlresolver.resolve(re.findall('iframe\s*src="([^"]+)',data)[0])
]]></expres>
<page></page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
I check it again. You don't need cloudflare

LSP XML:
<item>
<title>https://fullmatchsports.co/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  source=requests.get('https://fullmatchsports.co/',headers={'user-agent':'Mozilla/5.0','accept':'*/*'}).content
  data=re.findall('"content-thumbnail".+?href="([^"]+).+?:\s*(.*?)\s*Full.+?src="([^"]+)',source)
  for pn in range(2,11):
     pages='https://fullmatchsports.co/page/'+str(pn)+'/'
     source=requests.get(pages,headers={'user-agent':'Mozilla/5.0','accept':'*/*'}).content
     data +=re.findall('"content-thumbnail".+?href="([^"]+).+?:\s*(.*?)\s*Full.+?src="([^"]+)',source)
  return data
]]></expres>
<page></page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[makelist2.param2]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  source=requests.get('[makelist.param1]',headers={'user-agent':'Mozilla/5.0','referer':'https://fullmatchsports.co/'}).content
  return re.findall('"tab-title.+?href="\?tab=(?!server3)([^"]+).>(?!L)([^<]+)',re.findall('class="streaming">(?s)(.*?)class="tab-content',source)[0])
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,urllib,jsunpack,urlresolver
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  ref='[makelist.param1]?tab=[makelist2.param1]'
  source=requests.get(ref,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]'}).content
  link,host=re.findall('"iframe-container".+?src="((.*?)/em[^"]+)',source)[0]
  s=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':ref})
  if 'fullmatchsports' not in link:
    textlink,tok=re.findall('"videoUrl":"([^"]+).,"videoServer":"(\d+)',s.content.replace('\\',''))[0];txtlink='%s%s?s=%s&d='%(host,textlink,int(tok))
    source=requests.get(txtlink,headers={'user-agent':'Mozilla/5.0','referer':link,'accept':'*/*'},cookies=s.cookies).content
    if '1280' in source:
       return re.findall('1280.*\n(.*)',source)[0]+'|user-agent=ipad&referer=%s'%txtlink
    else:
       return re.findall('640.*\n(.*)',source)[0]+'|user-agent=ipad&referer=%s'%txtlink
  else:
    data=jsunpack.unpack(re.findall('(eval.*)',s.content)[0]).replace('\\','')
    if 'm38' in data:
       return re.findall('player[\w\W]*?(?:source|src|file)":\s*[\'"]([^\'"]+)',data)[0]+'|user-agent=ipad&referer=%s'%link
    else:
       return urlresolver.resolve(re.findall('iframe\s*src="([^"]+)',data)[0])
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: umonkey

wulf

New member
Jun 9, 2017
27
1
3
Hello everybody !Please can someone help me with thise code, how can i get more tham 100 items?



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

<regex>

<name>makelist</name>

<listrepeat><![CDATA[

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

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

  <info>[makelist.param3]</info>

  <thumbnail>[makelist.param2]</thumbnail>

]]></listrepeat>

<expres><![CDATA[#$pyFunction

import re,requests,json

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

  ref='https://www.dailymotion.com/playlist/x3orpp'

  s=requests.get(ref,headers={'user-agent':'Mozilla/5.0','referer':'https://www.dailymotion.com/'})

  tokurl,apiurl,cID,csecret=re.findall('"auth_url":"((.+?)oauth[^"]+).+?id":"([^"]+).+?secret":"([^"]+)',s.content)[0]

  tsegment=s.cookies['ts'];vID=s.cookies['v1st']

  payload={'client_id':cID,'client_secret':csecret,'grant_type':'client_credentials','traffic_segment':int(tsegment),'visitor_id':vID}

  source=requests.post(tokurl.replace('\\',''),headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'},data=payload,cookies=Cookie_Jar).content

  authortok,toktype=re.findall('"access_token".+?"([^"]+).+?"token_type".+?"([^"]+)',source)[0];auth='%s %s'%(toktype,authortok)

  jdata=json.dumps({"operationName":"DESKTOP_COLLECTION_VIDEO_QUERY","variables":{"xid":"x3orpp","pageCV":1,"allowExplicit":False},"query":"fragment COLLECTION_BASE_FRAGMENT on Collection {\n  id\n  xid\n  updatedAt\n  __typename\n}\n\nfragment COLLECTION_IMAGES_FRAGMENT on Collection {\n  thumbURLx60: thumbnailURL(size: \"x60\")\n  thumbURLx120: thumbnailURL(size: \"x120\")\n  thumbURLx180: thumbnailURL(size: \"x180\")\n  thumbURLx240: thumbnailURL(size: \"x240\")\n  thumbURLx360: thumbnailURL(size: \"x360\")\n  thumbURLx480: thumbnailURL(size: \"x480\")\n  thumbURLx720: thumbnailURL(size: \"x720\")\n  __typename\n}\n\nfragment CHANNEL_BASE_FRAGMENT on Channel {\n  id\n  xid\n  name\n  displayName\n  isArtist\n  logoURL(size: \"x60\")\n  isFollowed\n  accountType\n  __typename\n}\n\nfragment CHANNEL_IMAGES_FRAGMENT on Channel {\n  coverURLx375: coverURL(size: \"x375\")\n  __typename\n}\n\nfragment CHANNEL_UPDATED_FRAGMENT on Channel {\n  isFollowed\n  stats {\n    views {\n      total\n      __typename\n    }\n    followers {\n      total\n      __typename\n    }\n    videos {\n      total\n      __typename\n    }\n    __typename\n  }\n  __typename\n}\n\nfragment CHANNEL_NORMAL_FRAGMENT on Channel {\n  ...CHANNEL_BASE_FRAGMENT\n  ...CHANNEL_IMAGES_FRAGMENT\n  ...CHANNEL_UPDATED_FRAGMENT\n  __typename\n}\n\nfragment ALTERNATIVE_VIDEO_BASE_FRAGMENT on Video {\n  id\n  xid\n  title\n  description\n  thumbnail: thumbnailURL(size: \"x240\")\n  thumbURLx60: thumbnailURL(size: \"x60\")\n  thumbURLx120: thumbnailURL(size: \"x120\")\n  thumbURLx240: thumbnailURL(size: \"x240\")\n  thumbURLx360: thumbnailURL(size: \"x360\")\n  thumbURLx480: thumbnailURL(size: \"x480\")\n  thumbURLx720: thumbnailURL(size: \"x720\")\n  thumbURLx1080: thumbnailURL(size: \"x1080\")\n  bestAvailableQuality\n  viewCount\n  duration\n  createdAt\n  isInWatchLater\n  isLiked\n  isWatched\n  isExplicit\n  canDisplayAds\n  stats {\n    views {\n      total\n      __typename\n    }\n    __typename\n  }\n  __typename\n}\n\nfragment COLLECTION_UPDATED_FRAGMENT on Collection {\n  name\n  description\n  stats {\n    videos {\n      total\n      __typename\n    }\n    __typename\n  }\n  videos(first: 100, page: $pageCV, allowExplicit: $allowExplicit) {\n    pageInfo {\n      hasNextPage\n      nextPage\n      __typename\n    }\n    edges {\n      node {\n        __typename\n        ...ALTERNATIVE_VIDEO_BASE_FRAGMENT\n        channel {\n          ...CHANNEL_BASE_FRAGMENT\n          __typename\n        }\n      }\n      __typename\n    }\n    __typename\n  }\n  __typename\n}\n\nfragment COLLECTION_FRAGMENT on Collection {\n  ...COLLECTION_BASE_FRAGMENT\n  ...COLLECTION_UPDATED_FRAGMENT\n  ...COLLECTION_IMAGES_FRAGMENT\n  channel {\n    ...CHANNEL_NORMAL_FRAGMENT\n    __typename\n  }\n  __typename\n}\n\nquery DESKTOP_COLLECTION_VIDEO_QUERY($xid: String!, $pageCV: Int!, $allowExplicit: Boolean) {\n  collection(xid: $xid) {\n    ...COLLECTION_FRAGMENT\n    __typename\n  }\n}\n"})

  source=requests.post(apiurl.replace('\\',''),headers={'user-agent':'Mozilla/5.0','origin':'https://www.dailymotion.com','host':'graphql.api.dailymotion.com','referer':ref,'connection':'keep-alive','accept':'*/*, */*','content-type':'application/json','authorization':auth},data=jdata).content#json()['data']['collection']['videos']['edges']

  gdata=json.loads(source).get('data').get('collection').get('videos').get('edges')

  items=[]

  for item in gdata:

     title=item.get('node').get('title')

     xID=item.get('node').get('xid')

     thumb=item.get('node').get('thumbURLx480')

     info=item.get('node').get('description')

     items.append((title,thumb,info,xID))

  return items

]]></expres>

<page></page>

</regex>

<regex>

<name>getUrl</name>

<expres><![CDATA[#$pyFunction

import re,requests

def GetLSProData(page_data,Cookie_Jar,m,url='https://www.dailymotion.com/embed/video/[makelist.param4]'):#streamwatcher2013

  source=requests.get(url,headers={'user-agent':'Mozilla/5.0'},cookies=Cookie_Jar).content.replace('\\','')

  link=re.findall('x-mpegURL","url":"([^"]+)',source)[0]

  jdata=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':url},cookies=Cookie_Jar).content

  if 'x1080' in jdata:

    return re.findall('x1080.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer='+url

  elif 'x720' in jdata:

    return re.findall('x720.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer='+url

  else:

    return re.findall('512x.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer='+url

]]></expres>

<page></page>

</regex>
 
Last edited by a moderator:

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
Try this

LSP XML:
<item>
<title>Pé na Jaca (Completo)</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param1][/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <info>[makelist.param3]</info>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,json
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  ref='https://www.dailymotion.com/playlist/x3orpp'
  s=requests.get(ref,headers={'user-agent':'Mozilla/5.0','referer':'https://www.dailymotion.com/'})
  tokurl,apiurl,cID,csecret=re.findall('"auth_url":"((.+?)oauth[^"]+).+?id":"([^"]+).+?secret":"([^"]+)',s.content)[0]
  tsegment=s.cookies['ts'];vID=s.cookies['v1st']
  payload={'client_id':cID,'client_secret':csecret,'grant_type':'client_credentials','traffic_segment':int(tsegment),'visitor_id':vID}
  source=requests.post(tokurl.replace('\\',''),headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'},data=payload,cookies=Cookie_Jar).content
  authortok,toktype=re.findall('"access_token".+?"([^"]+).+?"token_type".+?"([^"]+)',source)[0];auth='%s %s'%(toktype,authortok)
  jdata1=json.dumps({"operationName":"DESKTOP_COLLECTION_VIDEO_QUERY","variables":{"xid":"x3orpp","pageCV":1,"allowExplicit":False},"query":"fragment COLLECTION_BASE_FRAGMENT on Collection {\n id\n xid\n updatedAt\n __typename\n}\n\nfragment COLLECTION_IMAGES_FRAGMENT on Collection {\n thumbURLx60: thumbnailURL(size: \"x60\")\n thumbURLx120: thumbnailURL(size: \"x120\")\n thumbURLx180: thumbnailURL(size: \"x180\")\n thumbURLx240: thumbnailURL(size: \"x240\")\n thumbURLx360: thumbnailURL(size: \"x360\")\n thumbURLx480: thumbnailURL(size: \"x480\")\n thumbURLx720: thumbnailURL(size: \"x720\")\n __typename\n}\n\nfragment CHANNEL_BASE_FRAGMENT on Channel {\n id\n xid\n name\n displayName\n isArtist\n logoURL(size: \"x60\")\n isFollowed\n accountType\n __typename\n}\n\nfragment CHANNEL_IMAGES_FRAGMENT on Channel {\n coverURLx375: coverURL(size: \"x375\")\n __typename\n}\n\nfragment CHANNEL_UPDATED_FRAGMENT on Channel {\n isFollowed\n stats {\n views {\n total\n __typename\n }\n followers {\n total\n __typename\n }\n videos {\n total\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment CHANNEL_NORMAL_FRAGMENT on Channel {\n ...CHANNEL_BASE_FRAGMENT\n ...CHANNEL_IMAGES_FRAGMENT\n ...CHANNEL_UPDATED_FRAGMENT\n __typename\n}\n\nfragment ALTERNATIVE_VIDEO_BASE_FRAGMENT on Video {\n id\n xid\n title\n description\n thumbnail: thumbnailURL(size: \"x240\")\n thumbURLx60: thumbnailURL(size: \"x60\")\n thumbURLx120: thumbnailURL(size: \"x120\")\n thumbURLx240: thumbnailURL(size: \"x240\")\n thumbURLx360: thumbnailURL(size: \"x360\")\n thumbURLx480: thumbnailURL(size: \"x480\")\n thumbURLx720: thumbnailURL(size: \"x720\")\n thumbURLx1080: thumbnailURL(size: \"x1080\")\n bestAvailableQuality\n viewCount\n duration\n createdAt\n isInWatchLater\n isLiked\n isWatched\n isExplicit\n canDisplayAds\n stats {\n views {\n total\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment COLLECTION_UPDATED_FRAGMENT on Collection {\n name\n description\n stats {\n videos {\n total\n __typename\n }\n __typename\n }\n videos(first: 100, page: $pageCV, allowExplicit: $allowExplicit) {\n pageInfo {\n hasNextPage\n nextPage\n __typename\n }\n edges {\n node {\n __typename\n ...ALTERNATIVE_VIDEO_BASE_FRAGMENT\n channel {\n ...CHANNEL_BASE_FRAGMENT\n __typename\n }\n }\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment COLLECTION_FRAGMENT on Collection {\n ...COLLECTION_BASE_FRAGMENT\n ...COLLECTION_UPDATED_FRAGMENT\n ...COLLECTION_IMAGES_FRAGMENT\n channel {\n ...CHANNEL_NORMAL_FRAGMENT\n __typename\n }\n __typename\n}\n\nquery DESKTOP_COLLECTION_VIDEO_QUERY($xid: String!, $pageCV: Int!, $allowExplicit: Boolean) {\n collection(xid: $xid) {\n ...COLLECTION_FRAGMENT\n __typename\n }\n}\n"})
  source1=requests.post(apiurl.replace('\\',''),headers={'user-agent':'Mozilla/5.0','origin':'https://www.dailymotion.com','host':'graphql.api.dailymotion.com','referer':ref,'connection':'keep-alive','accept':'*/*, */*','content-type':'application/json','authorization':auth},data=jdata1).content
  gdata1=json.loads(source1).get('data').get('collection').get('videos').get('edges')
  jdata2=json.dumps({"operationName":"DESKTOP_COLLECTION_VIDEO_QUERY","variables":{"xid":"x3orpp","pageCV":2,"allowExplicit":False},"query":"fragment COLLECTION_BASE_FRAGMENT on Collection {\n id\n xid\n updatedAt\n __typename\n}\n\nfragment COLLECTION_IMAGES_FRAGMENT on Collection {\n thumbURLx60: thumbnailURL(size: \"x60\")\n thumbURLx120: thumbnailURL(size: \"x120\")\n thumbURLx180: thumbnailURL(size: \"x180\")\n thumbURLx240: thumbnailURL(size: \"x240\")\n thumbURLx360: thumbnailURL(size: \"x360\")\n thumbURLx480: thumbnailURL(size: \"x480\")\n thumbURLx720: thumbnailURL(size: \"x720\")\n __typename\n}\n\nfragment CHANNEL_BASE_FRAGMENT on Channel {\n id\n xid\n name\n displayName\n isArtist\n logoURL(size: \"x60\")\n isFollowed\n accountType\n __typename\n}\n\nfragment CHANNEL_IMAGES_FRAGMENT on Channel {\n coverURLx375: coverURL(size: \"x375\")\n __typename\n}\n\nfragment CHANNEL_UPDATED_FRAGMENT on Channel {\n isFollowed\n stats {\n views {\n total\n __typename\n }\n followers {\n total\n __typename\n }\n videos {\n total\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment CHANNEL_NORMAL_FRAGMENT on Channel {\n ...CHANNEL_BASE_FRAGMENT\n ...CHANNEL_IMAGES_FRAGMENT\n ...CHANNEL_UPDATED_FRAGMENT\n __typename\n}\n\nfragment ALTERNATIVE_VIDEO_BASE_FRAGMENT on Video {\n id\n xid\n title\n description\n thumbnail: thumbnailURL(size: \"x240\")\n thumbURLx60: thumbnailURL(size: \"x60\")\n thumbURLx120: thumbnailURL(size: \"x120\")\n thumbURLx240: thumbnailURL(size: \"x240\")\n thumbURLx360: thumbnailURL(size: \"x360\")\n thumbURLx480: thumbnailURL(size: \"x480\")\n thumbURLx720: thumbnailURL(size: \"x720\")\n thumbURLx1080: thumbnailURL(size: \"x1080\")\n bestAvailableQuality\n viewCount\n duration\n createdAt\n isInWatchLater\n isLiked\n isWatched\n isExplicit\n canDisplayAds\n stats {\n views {\n total\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment COLLECTION_UPDATED_FRAGMENT on Collection {\n name\n description\n stats {\n videos {\n total\n __typename\n }\n __typename\n }\n videos(first: 100, page: $pageCV, allowExplicit: $allowExplicit) {\n pageInfo {\n hasNextPage\n nextPage\n __typename\n }\n edges {\n node {\n __typename\n ...ALTERNATIVE_VIDEO_BASE_FRAGMENT\n channel {\n ...CHANNEL_BASE_FRAGMENT\n __typename\n }\n }\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment COLLECTION_FRAGMENT on Collection {\n ...COLLECTION_BASE_FRAGMENT\n ...COLLECTION_UPDATED_FRAGMENT\n ...COLLECTION_IMAGES_FRAGMENT\n channel {\n ...CHANNEL_NORMAL_FRAGMENT\n __typename\n }\n __typename\n}\n\nquery DESKTOP_COLLECTION_VIDEO_QUERY($xid: String!, $pageCV: Int!, $allowExplicit: Boolean) {\n collection(xid: $xid) {\n ...COLLECTION_FRAGMENT\n __typename\n }\n}\n"})
  source2=requests.post(apiurl.replace('\\',''),headers={'user-agent':'Mozilla/5.0','origin':'https://www.dailymotion.com','host':'graphql.api.dailymotion.com','referer':ref,'connection':'keep-alive','accept':'*/*, */*','content-type':'application/json','authorization':auth},data=jdata2).content
  gdata2=json.loads(source2).get('data').get('collection').get('videos').get('edges')
  gdata=gdata1+gdata2
  items=[]
  for item in gdata:
     title=item.get('node').get('title')
     xID=item.get('node').get('xid')
     thumb=item.get('node').get('thumbURLx480')
     info=item.get('node').get('description').replace('<br','').replace('/>','- ')
     items.append((title,thumb,info,xID))
  return items
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m,url='https://www.dailymotion.com/embed/video/[makelist.param4]'):#streamwatcher2013
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0'},cookies=Cookie_Jar).content.replace('\\','')
  link=re.findall('x-mpegURL","url":"([^"]+)',source)[0]
  jdata=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':url},cookies=Cookie_Jar).content
  if 'x1080' in jdata:
    return re.findall('x1080.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/[makelist.param4]?playlist=x3orpp'
  elif 'x720' in jdata:
    return re.findall('x720.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/[makelist.param4]?playlist=x3orpp'
  else:
    return re.findall('512x.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/[makelist.param4]?playlist=x3orpp'
]]></expres>
<page></page>
</regex>
<thumbnail>https://upload.wikimedia.org/wikipedia/pt/thumb/0/0e/P%C3%A9_na_Jaca.jpg/260px-P%C3%A9_na_Jaca.jpg</thumbnail>
</item>
 
  • Like
Reactions: wulf

asiantv

New member
Jul 12, 2020
12
0
1
anyone has this site regex to play on kodi?

Code:
https://watchwrestling.store/
or this one?

Code:
https://watchwrestling.store/watch-ufc-254-khabib-vs-gaethje-10-24-20/
 

wulf

New member
Jun 9, 2017
27
1
3
Very good streamwatch 2013! This is exactly what i want thank you. Men you are the best, the code show all the items now. you save me lots of job TANK YOU AGAIN.:
<item>
<title>Pé na Jaca (Completo)</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param1][/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <info>[makelist.param3]</info>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests,json
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  ref='https://www.dailymotion.com/playlist/x3orpp'
  s=requests.get(ref,headers={'user-agent':'Mozilla/5.0','referer':'https://www.dailymotion.com/'})
  tokurl,apiurl,cID,csecret=re.findall('"auth_url":"((.+?)oauth[^"]+).+?id":"([^"]+).+?secret":"([^"]+)',s.content)[0]
  tsegment=s.cookies['ts'];vID=s.cookies['v1st']
  payload={'client_id':cID,'client_secret':csecret,'grant_type':'client_credentials','traffic_segment':int(tsegment),'visitor_id':vID}
  source=requests.post(tokurl.replace('\\',''),headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'},data=payload,cookies=Cookie_Jar).content
  authortok,toktype=re.findall('"access_token".+?"([^"]+).+?"token_type".+?"([^"]+)',source)[0];auth='%s %s'%(toktype,authortok)
  jdata1=json.dumps({"operationName":"DESKTOP_COLLECTION_VIDEO_QUERY","variables":{"xid":"x3orpp","pageCV":1,"allowExplicit":False},"query":"fragment COLLECTION_BASE_FRAGMENT on Collection {\n id\n xid\n updatedAt\n __typename\n}\n\nfragment COLLECTION_IMAGES_FRAGMENT on Collection {\n thumbURLx60: thumbnailURL(size: \"x60\")\n thumbURLx120: thumbnailURL(size: \"x120\")\n thumbURLx180: thumbnailURL(size: \"x180\")\n thumbURLx240: thumbnailURL(size: \"x240\")\n thumbURLx360: thumbnailURL(size: \"x360\")\n thumbURLx480: thumbnailURL(size: \"x480\")\n thumbURLx720: thumbnailURL(size: \"x720\")\n __typename\n}\n\nfragment CHANNEL_BASE_FRAGMENT on Channel {\n id\n xid\n name\n displayName\n isArtist\n logoURL(size: \"x60\")\n isFollowed\n accountType\n __typename\n}\n\nfragment CHANNEL_IMAGES_FRAGMENT on Channel {\n coverURLx375: coverURL(size: \"x375\")\n __typename\n}\n\nfragment CHANNEL_UPDATED_FRAGMENT on Channel {\n isFollowed\n stats {\n views {\n total\n __typename\n }\n followers {\n total\n __typename\n }\n videos {\n total\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment CHANNEL_NORMAL_FRAGMENT on Channel {\n ...CHANNEL_BASE_FRAGMENT\n ...CHANNEL_IMAGES_FRAGMENT\n ...CHANNEL_UPDATED_FRAGMENT\n __typename\n}\n\nfragment ALTERNATIVE_VIDEO_BASE_FRAGMENT on Video {\n id\n xid\n title\n description\n thumbnail: thumbnailURL(size: \"x240\")\n thumbURLx60: thumbnailURL(size: \"x60\")\n thumbURLx120: thumbnailURL(size: \"x120\")\n thumbURLx240: thumbnailURL(size: \"x240\")\n thumbURLx360: thumbnailURL(size: \"x360\")\n thumbURLx480: thumbnailURL(size: \"x480\")\n thumbURLx720: thumbnailURL(size: \"x720\")\n thumbURLx1080: thumbnailURL(size: \"x1080\")\n bestAvailableQuality\n viewCount\n duration\n createdAt\n isInWatchLater\n isLiked\n isWatched\n isExplicit\n canDisplayAds\n stats {\n views {\n total\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment COLLECTION_UPDATED_FRAGMENT on Collection {\n name\n description\n stats {\n videos {\n total\n __typename\n }\n __typename\n }\n videos(first: 100, page: $pageCV, allowExplicit: $allowExplicit) {\n pageInfo {\n hasNextPage\n nextPage\n __typename\n }\n edges {\n node {\n __typename\n ...ALTERNATIVE_VIDEO_BASE_FRAGMENT\n channel {\n ...CHANNEL_BASE_FRAGMENT\n __typename\n }\n }\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment COLLECTION_FRAGMENT on Collection {\n ...COLLECTION_BASE_FRAGMENT\n ...COLLECTION_UPDATED_FRAGMENT\n ...COLLECTION_IMAGES_FRAGMENT\n channel {\n ...CHANNEL_NORMAL_FRAGMENT\n __typename\n }\n __typename\n}\n\nquery DESKTOP_COLLECTION_VIDEO_QUERY($xid: String!, $pageCV: Int!, $allowExplicit: Boolean) {\n collection(xid: $xid) {\n ...COLLECTION_FRAGMENT\n __typename\n }\n}\n"})
  source1=requests.post(apiurl.replace('\\',''),headers={'user-agent':'Mozilla/5.0','origin':'https://www.dailymotion.com','host':'graphql.api.dailymotion.com','referer':ref,'connection':'keep-alive','accept':'*/*, */*','content-type':'application/json','authorization':auth},data=jdata1).content
  gdata1=json.loads(source1).get('data').get('collection').get('videos').get('edges')
  jdata2=json.dumps({"operationName":"DESKTOP_COLLECTION_VIDEO_QUERY","variables":{"xid":"x3orpp","pageCV":2,"allowExplicit":False},"query":"fragment COLLECTION_BASE_FRAGMENT on Collection {\n id\n xid\n updatedAt\n __typename\n}\n\nfragment COLLECTION_IMAGES_FRAGMENT on Collection {\n thumbURLx60: thumbnailURL(size: \"x60\")\n thumbURLx120: thumbnailURL(size: \"x120\")\n thumbURLx180: thumbnailURL(size: \"x180\")\n thumbURLx240: thumbnailURL(size: \"x240\")\n thumbURLx360: thumbnailURL(size: \"x360\")\n thumbURLx480: thumbnailURL(size: \"x480\")\n thumbURLx720: thumbnailURL(size: \"x720\")\n __typename\n}\n\nfragment CHANNEL_BASE_FRAGMENT on Channel {\n id\n xid\n name\n displayName\n isArtist\n logoURL(size: \"x60\")\n isFollowed\n accountType\n __typename\n}\n\nfragment CHANNEL_IMAGES_FRAGMENT on Channel {\n coverURLx375: coverURL(size: \"x375\")\n __typename\n}\n\nfragment CHANNEL_UPDATED_FRAGMENT on Channel {\n isFollowed\n stats {\n views {\n total\n __typename\n }\n followers {\n total\n __typename\n }\n videos {\n total\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment CHANNEL_NORMAL_FRAGMENT on Channel {\n ...CHANNEL_BASE_FRAGMENT\n ...CHANNEL_IMAGES_FRAGMENT\n ...CHANNEL_UPDATED_FRAGMENT\n __typename\n}\n\nfragment ALTERNATIVE_VIDEO_BASE_FRAGMENT on Video {\n id\n xid\n title\n description\n thumbnail: thumbnailURL(size: \"x240\")\n thumbURLx60: thumbnailURL(size: \"x60\")\n thumbURLx120: thumbnailURL(size: \"x120\")\n thumbURLx240: thumbnailURL(size: \"x240\")\n thumbURLx360: thumbnailURL(size: \"x360\")\n thumbURLx480: thumbnailURL(size: \"x480\")\n thumbURLx720: thumbnailURL(size: \"x720\")\n thumbURLx1080: thumbnailURL(size: \"x1080\")\n bestAvailableQuality\n viewCount\n duration\n createdAt\n isInWatchLater\n isLiked\n isWatched\n isExplicit\n canDisplayAds\n stats {\n views {\n total\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment COLLECTION_UPDATED_FRAGMENT on Collection {\n name\n description\n stats {\n videos {\n total\n __typename\n }\n __typename\n }\n videos(first: 100, page: $pageCV, allowExplicit: $allowExplicit) {\n pageInfo {\n hasNextPage\n nextPage\n __typename\n }\n edges {\n node {\n __typename\n ...ALTERNATIVE_VIDEO_BASE_FRAGMENT\n channel {\n ...CHANNEL_BASE_FRAGMENT\n __typename\n }\n }\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment COLLECTION_FRAGMENT on Collection {\n ...COLLECTION_BASE_FRAGMENT\n ...COLLECTION_UPDATED_FRAGMENT\n ...COLLECTION_IMAGES_FRAGMENT\n channel {\n ...CHANNEL_NORMAL_FRAGMENT\n __typename\n }\n __typename\n}\n\nquery DESKTOP_COLLECTION_VIDEO_QUERY($xid: String!, $pageCV: Int!, $allowExplicit: Boolean) {\n collection(xid: $xid) {\n ...COLLECTION_FRAGMENT\n __typename\n }\n}\n"})
  source2=requests.post(apiurl.replace('\\',''),headers={'user-agent':'Mozilla/5.0','origin':'https://www.dailymotion.com','host':'graphql.api.dailymotion.com','referer':ref,'connection':'keep-alive','accept':'*/*, */*','content-type':'application/json','authorization':auth},data=jdata2).content
  gdata2=json.loads(source2).get('data').get('collection').get('videos').get('edges')
  gdata=gdata1+gdata2
  items=[]
  for item in gdata:
     title=item.get('node').get('title')
     xID=item.get('node').get('xid')
     thumb=item.get('node').get('thumbURLx480')
     info=item.get('node').get('description').replace('<br','').replace('/>','- ')
     items.append((title,thumb,info,xID))
  return items
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m,url='https://www.dailymotion.com/embed/video/[makelist.param4]'):#streamwatcher2013
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0'},cookies=Cookie_Jar).content.replace('\\','')
  link=re.findall('x-mpegURL","url":"([^"]+)',source)[0]
  jdata=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':url},cookies=Cookie_Jar).content
  if 'x1080' in jdata:
    return re.findall('x1080.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/[makelist.param4]?playlist=x3orpp'
  elif 'x720' in jdata:
    return re.findall('x720.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/[makelist.param4]?playlist=x3orpp'
  else:
    return re.findall('512x.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/[makelist.param4]?playlist=x3orpp'
]]></expres>
<page></page>
</regex>
<thumbnail>https://upload.wikimedia.org/wikipedia/pt/thumb/0/0e/P%C3%A9_na_Jaca.jpg/260px-P%C3%A9_na_Jaca.jpg</thumbnail>
</item>
 

wulf

New member
Jun 9, 2017
27
1
3
Hello streamwatch 2013, the code you make work fine the only problem is the fest 11 itms return one error can we fix this ?

Code:
3:42:39.181 T:5060   ERROR: Traceback (most recent call last):
13:42:39.181 T:5060   ERROR:   File "C:\Users\charl\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\default.py", line 2037, in doEvalFunction
13:42:39.182 T:5060   ERROR:     ret_val=LSProdynamicCode.GetLSProData(page_data,Cookie_Jar,m)
13:42:39.182 T:5060   ERROR:   File "C:\Users\charl\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.live.streamspro\LSProdynamicCode1.py", line 13, in GetLSProData
13:42:39.183 T:5060   ERROR:     return re.findall('512x. \n([^#] )',jdata)[0] '|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/x6ksflh?playlist=x5u4nw'
13:42:39.183 T:5060   ERROR: IndexError: list index out of range
13:42:39.183 T:5060   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: 'NoneType' object is not iterable
                                            Traceback (most recent call last):
                                              File "C:\Users\charl\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\default.py", line 3282, in <module>
                                                url,setresolved = getRegexParsed(regexs, url)
                                            TypeError: 'NoneType' object is not iterable
                                            -->End of Python script error report<--
13:42:39.287 T:8840   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.live.streamspro/?url=$doregex[getUrl]&mode=17&regexs={u'getUrl': {'expres': u'#$pyFunction\nimport re,requests\ndef GetLSProData(page_data,Cookie_Jar,m,url=\'https://www.dailymotion.com/embed/video/x6ksflh\'):#streamwatcher2013\n  source=requests.get(url,headers={\'user-agent\':\'Mozilla/5.0\'},cookies=Cookie_Jar).content.replace(\'\\\\\',\'\')\n  link=re.findall(\'x-mpegURL","url":"([^"]+)\',source)[0]\n  jdata=requests.get(link,headers={\'user-agent\':\'Mozilla/5.0\',\'referer\':url},cookies=Cookie_Jar).content\n  if \'x1080\' in jdata:\n    return re.findall(\'x1080.+\\n([^#]+)\',jdata)[0]+\'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/x6ksflh?playlist=x5u4nw\'\n  elif \'x720\' in jdata:\n    return re.findall(\'x720.+\\n([^#]+)\',jdata)[0]+\'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/x6ksflh?playlist=x5u4nw\'\n  else:\n    return re.findall(\'512x.+\\n([^#]+)\',jdata)[0]+\'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/x6ksflh?playlist=x5u4nw\'\n', 'name': u'getUrl', 'page': u'None'}}&iconimage=https://s2.dmcdn.net/v/NjAdr1VYNE6OvfUb5/x480]
 

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
From you error the source code has difference value. Change the line below

Code:
  Change this line
 
  return re.findall('512x.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/[makelist.param4]?playlist=x3orpp'
 
  To this. It should fix it
 
  return re.findall('(?:552|512)x.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/[makelist.param4]?playlist=x3orpp'
 
  • Agree
Reactions: wulf

TRC4

New member
Mar 6, 2016
28
3
3
Netherland
can someone help me for licensing decode ismv streams format.
r-live-origin.DS*V.com/USL15/SH2/
 

gujal

Developer
Dec 26, 2013
591
327
63
ismv generally will use Microsoft Playready DRM, which is not supported in Kodi. Same with HLS that uses Apple Fairplay DRM.

The only DRM supported in Kodi is Widevine as used by MPEG-DASH mpd files
 

gujal

Developer
Dec 26, 2013
591
327
63
It is even more futile as vlc player does not support any DRM, and this thread is specifically for Livestreamspro addon running under Kodi. Can't support anything other than that setup as I only know how to do on this setup.
 

TRC4

New member
Mar 6, 2016
28
3
3
Netherland
works in vlc but disconnects every 30 seconds,
keys
Code:
 http://r-live-origin.DS*V.com/USL15/SH2/SH2.isml
remove SH2.isml from link and test with vlc
 
Last edited by a moderator:

Doom

Member
Sep 16, 2019
321
21
18

gujal

Developer
Dec 26, 2013
591
327
63
Enjoy!

LSP XML:
<item>
<title>Space TV</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, base64, jsunpack
  url = 'https://espare.tk/embed/generator.php?id=space_lat'
  headers = {'User-Agent': 'iPad',
             'Referer': 'https://adictosalatele.com/'}
  page_data = requests.get(url, headers=headers, verify=False).text
  pdata = re.search('(eval\(function\(p,a,c,k,e.+?)</script', page_data, re.DOTALL)
  if pdata:
    page_data += jsunpack.unpack(pdata.group(1))
  burl = re.findall('MARIOCSCryptOld\("([^"]+)', page_data)[0]
  while 'm3u8' not in burl:
    burl = base64.b64decode(burl)
  return burl
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
  • Winner
Reactions: tungbeng95 and Doom

wulf

New member
Jun 9, 2017
27
1
3
This fix the problem tank you i just have one quastion more the last one , whats can i do to show the fest itms whats , because miss the fest item all is there but the fist itms not ?


Code:
Change this line
 
  return re.findall('512x.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/[makelist.param4]?playlist=x3orpp'
 
  To this. It should fix it
 
  return re.findall('(?:552|512)x.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/video/[makelist.param4]?playlist=x3orpp'
 

tnico

New member
May 29, 2015
20
0
1
HI @streamwatcher2013, this regex stop to work.

Code:
<item>

<title>YOUTUBE SEARCH</title>

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

<regex>

<name>makelist</name>

<listrepeat><![CDATA[

<title>([makelist.param3]) [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,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>
 
Last edited by a moderator:

mustafa19554

Guest
May 17, 2016
28
3
3
TRC4
Samstag um 23:19 Uhr
TE QIFSHA CEKURIN EDHE JEVGJIT E TURQISE
-----------------------------------------------------------------------------------
The one insult for the whole people. We can not accept that and give the same swear word back to him, also I would like to be kicked out of the forum by admin immediately. Thank you
 
  • Like
Reactions: mahox and altug

Doom

Member
Sep 16, 2019
321
21
18

gujal

Developer
Dec 26, 2013
591
327
63
The source is the same and the code is the same!
Enjoy!

LSP XML:
<item>
<title>Fox Sports Premium</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, base64, jsunpack
  url = 'https://espare.tk/embed/generator.php?id=fox_sports_premium_lat'
  headers = {'User-Agent': 'iPad',
             'Referer': 'https://adictosalatele.com/'}
  page_data = requests.get(url, headers=headers, verify=False).text
  pdata = re.search('(eval\(function\(p,a,c,k,e.+?)</script', page_data, re.DOTALL)
  if pdata:
    page_data += jsunpack.unpack(pdata.group(1))
  burl = re.findall('MARIOCSCryptOld\("([^"]+)', page_data)[0]
  while 'm3u8' not in burl:
    burl = base64.b64decode(burl)
  return burl
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
  • Happy
Reactions: tungbeng95 and Doom

Doom

Member
Sep 16, 2019
321
21
18

gujal

Developer
Dec 26, 2013
591
327
63
Similar code to previous one.

LSP XML:
<item>
<title>DirecTV Sports Plus1</title>
<link>$doregex[getUrl]|user-agent=iPad</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, jsunpack
  pdata = re.search('(eval\(function\(p,a,c,k,e.+?)</script', page_data, re.DOTALL)
  if pdata:
    page_data += jsunpack.unpack(pdata.group(1))
  burl = re.findall('source:\s*"([^"]+)', page_data)[0]
  return burl
]]></expres>
<page>https://wstream.to/embed/3053isbp0kw7hsi</page>
<referer>https://www.televisiongratishd.com/</referer>
</regex>
</item>
 
  • Happy
Reactions: Doom

efradncr

Member
Mar 26, 2018
63
2
8
can you help me with a regex code for this site?
Code:
hxxp://www.ctni.org/streaming1.html
 

franciscotorre

New member
Feb 14, 2020
6
0
1
Hello good afternoon, I have looked at this regex, and it is great, but when you access the list of chapters, only those of the first web page appear. Would it be possible to repair it? Thank you very much in advance.


Code:
<item>

<title>https://optimovision.tv/novelas-completas</title>

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

<thumbnail>https://optimovision.tv/images/logo/logo.png</thumbnail>

<regex>

<name>makelist</name>

<listrepeat><![CDATA[

  <title>[makelist.param3]</title>

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

<thumbnail>https://optimovision.tv/[makelist.param2]</thumbnail>

]]></listrepeat>

<expres><![CDATA[#$pyFunction

import re,requests

def GetLSProData(page_data,Cookie_Jar,m):

count=re.findall('(\d+)</a></li><li\s*class',page_data)[0];pn=1;data=[]

while pn <= int(count):

pages='https://optimovision.tv/novelas-completas/?page='+str(pn)

source=requests.get(pages,headers={'user-agent':'Mozilla/5.0','referer':'https://optimovision.tv/novelas-completas'}).content

data +=re.findall('(?s)href="/([^"]+).+?src="/(.*?)"\s*title="([^"]+)',re.findall('id="list_videos">(?s)(.*?)pagination',source)[0]);pn +=1

return data

]]></expres>

<page>https://optimovision.tv/novelas-completas</page>

</regex>

<regex>

<name>makelist2</name>

<listrepeat><![CDATA[

  <title>[makelist2.param3]</title>

<link>$doregex[getUrl]|user-agent=ipad&amp;referer=https://optimovision.tv/[makelist2.param1]</link>

<thumbnail>[makelist2.param2]</thumbnail>

]]></listrepeat>

<expres><![CDATA[#$pyFunction

import re

def GetLSProData(page_data,Cookie_Jar,m):

return re.findall('class="">\s*<a\s*href="/([^"]+).+?src="(.*?)"\s*title="([^"]+)',re.findall('id="list_videos"(?s)(.*?)footer-container',page_data)[0])

]]></expres>

<page>https://optimovision.tv/[makelist.param1]</page>

<referer>https://optimovision.tv/novelas-completas</referer>

</regex>

<regex>

<name>getUrl</name>

<expres><![CDATA[<video.+?src="([^"]+)]]></expres>

<page>https://optimovision.tv/[makelist2.param1]</page>

<referer>https://optimovision.tv/[makelist.param1]</referer>

</regex>

</item>
 
Last edited by a moderator:

streamwatcher2013

Well-known member
Oct 24, 2013
986
446
63
USA
Try this:

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

03stevensmi

Member
Sep 12, 2019
47
4
8
@streamwatcher2013
Hey man, i'm trying to fix this regex to play kimcartoon links. so far they all come up blank.

Could you fix bro

Code:
<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=.my_Video_1[\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=.my_Video_1[\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

Member
Sep 12, 2019
47
4
8
@streamwatcher2013 I know, thats what i'm already using man. I can access kimcartoon fine, the problem i have is getting the video links. I have tried to fix it myself by renaming myvideo to the correct my_video_1 and tried to add the rest of the sources "fe,mx,p2p,alpha,beta" but they all show up blank. Can you take a look at this to see if they can be added or fixed. cheers
 
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5