LSP Regex & Makelist Discussion.

gladio

New member
Oct 14, 2018
21
3
3
please help with this thanks

https://www.dailymotion.com/video/x5gv5rr?playlist=x69row
 
  • Like
Reactions: DerWolf and turko03

mustafa19554

Guest
May 17, 2016
28
3
3
Try this:

<item>
<title>https://www.dailymotion.com/embed/video/x5gv5rr </title>
<link>$doregex[start]|Cookie=$get_cookies$</link>
<regex>
<name>start</name>
<expres>(http.*)\#</expres>
<page>$doregex&amp;redirect=0</page> <referer>http://www.dailymotion.com/</referer> <cookieJar></cookieJar> </regex> <regex> <name>url</name> <expres>$pyFunction:'$doregex[jsonurl]'.replace('\/','/')</expres> <page></page> </regex> <regex> <name>jsonurl</name> <expres>x-mpegURL","url":"(.*?)"</expres> <page>https://www.dailymotion.com/embed/video/x5gv5rr</page> <cookieJar></cookieJar> </regex> <thumbnail></thumbnail> </item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
918
401
63
USA
Try this. Must be Kodi 18.x

LSP XML:
<item>
<title>LIVE C8 - Vidéo Dailymotion</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  source=requests.get('https://www.dailymotion.com/embed/video/x5gv5rr',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':'https://www.dailymotion.com/embed/video/x5gv5rr'},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/embed/video/x5gv5rr'
  elif 'x720' in jdata:
    return re.findall('x720.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/embed/video/x5gv5rr'
  else:
    return re.findall('512x.+\n([^#]+)',jdata)[0]+'|user-agent=ipad&origin=https://www.dailymotion.com&referer=https://www.dailymotion.com/embed/video/x5gv5rr'
]]></expres>
<page></page>
</regex>
<thumbnail>https://s2.dmcdn.net/v/JjNBt1VPyrJ-UucuQ/x480</thumbnail>
</item>

<item>
<title>LIVE C8 - Vidéo Dailymotion</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  url='https://www.dailymotion.com/player/metadata/video/x5gv5rr?embedder=https%3A%2F%2Fwww.dailymotion.com%2Fvideo%2Fx5gv5rr%3Fplaylist%3Dx69row&referer=&app=com.dailymotion.neon&client_type=website&section_type=player&component_style=_'
  link=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'https://www.dailymotion.com/video/x5gv5rr'},cookies=Cookie_Jar).json()['qualities']['auto'][0]['url']
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://www.dailymotion.com/video/x5gv5rr'},cookies=Cookie_Jar).content
  if 'x1080' in source:
    return re.findall('x1080.+\n([^#]+)',source)[0]+'|user-agent=ipad&referer=https://www.dailymotion.com/'
  elif 'x720' in source:
    return re.findall('x720.+\n([^#]+)',source)[0]+'|user-agent=ipad&referer=https://www.dailymotion.com/'
  else:
    return re.findall('512x.+\n([^#]+)',source)[0]+'|user-agent=ipad&referer=https://www.dailymotion.com/'
]]></expres>
<page></page>
</regex>
<thumbnail>https://s2.dmcdn.net/v/JjNBt1VPyrJ-UucuQ/x480</thumbnail>
</item>
 
  • Like
Reactions: DerWolf

streamwatcher2013

Well-known member
Oct 24, 2013
918
401
63
USA
@gladio

It works fine here


@DerWolf

Enjoy!

LSP XML:
<item>
<title>Ganze Filme auf Deutsch</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/x3yn3x'
  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":"x3yn3x","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>
<thumbnail></thumbnail>
</item>
 
  • Like
Reactions: altug and turko03

mustafa19554

Guest
May 17, 2016
28
3
3
try this




<item>
<title>https://www.dailymotion.com/embed/video/x5gv5rr </title>
<link>$doregex[start]|Cookie=$get_cookies$</link>
<regex>
<name>start</name>
<expres>(http.*)\#</expres>
<page>$doregex[url]&amp;redirect=0</page>
<referer>http://www.dailymotion.com/</referer>
<cookieJar></cookieJar>
</regex>


<regex>
<name>url</name>
<expres>$pyFunction:'$doregex[jsonurl]'.replace('\/','/')</expres>
<page></page>
</regex>
<regex>
<name>jsonurl</name>
<expres>x-mpegURL","url":"(.*?)"</expres>
<page>https://www.dailymotion.com/embed/video/x5gv5rr</page>
<cookieJar></cookieJar>
</regex>
<thumbnail></thumbnail>
</item>

[/ ICODE]
 

DerWolf

Member
Nov 20, 2019
43
5
8
can you help me the stream thanks in adcance

hxxps://service-stitcher.clusters.pluto.tv/stitch/hls/channel/5c5c3b948002db3c3e0b262e/master.m3u8?terminate=false&deviceType=web&deviceMake=web&deviceModel=web&sid=0&deviceId=5c5c3b948002db3c3e0b262e&deviceVersion=DNT&appVersion=DNT&deviceDNT=1&userId=&advertisingId=&deviceLat=&deviceLon=&app_name=&appName=web&buildVersion=&appStoreUrl=&architecture=&includeExtendedEvents=false&marketingRegion=DE&serverSideAds=false
 

upd8t3r

Member
Oct 16, 2019
46
18
8
Here you go

XML:
<item>
<title>[B]PLUTO TV MOVIES[/B]</title>
<inputstream>http://service-stitcher.clusters.pluto.tv/stitch/hls/channel/5c5c3b948002db3c3e0b262e/master.m3u8?advertisingId=&amp;appName=web&amp;appVersion=5.5.1-47ae969efab27ec552faf45ab4c7e4c6a50ac344&amp;architecture=&amp;buildVersion=&amp;clientTime=&amp;deviceDNT=0&amp;deviceId=5c5c3b948002db3c3e0b262e&amp;deviceLat=&amp;deviceLon=&amp;deviceMake=Chrome&amp;deviceModel=Chrome&amp;deviceType=web&amp;deviceVersion=83.0.4103.116&amp;includeExtendedEvents=false&amp;marketingRegion=DE&amp;sid=f2b2e804-98d9-40db-95ed-1215e613a7e0&amp;userId=&amp;serverSideAds=true|User-Agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36</inputstream>
<thumbnail>http://images.pluto.tv/channels/5c5c3b948002db3c3e0b262e/thumbnail.jpg?w=250&amp;h=250&amp;fm=jpg&amp;q=75&amp;fit=fill&amp;fill=blur</thumbnail>
<fanart>http://pluto.tv.s3.amazonaws.com/channels/5c5c3b948002db3c3e0b262e/featuredImage.jpg</fanart>
</item>
 
  • Like
Reactions: turko03

atlantius21

New member
Aug 12, 2016
13
0
1
Hi, regex stop working. Can anybody fix this?

Code:
<item>
<title>Food Network UK</title>
<link>plugin://plugin.video.f4mTester/?streamtype=HLSRETRY&amp;url=$doregex[get-url]</link>
<regex>
<name>get-url</name>
<expres><![CDATA[#$pyFunction
def getCookiesString(cookieJar):
    try:
        cookieString=""
        for index, cookie in enumerate(cookieJar):
            cookieString+=cookie.name + "=" + cookie.value +";"
    except: pass
    #print 'cookieString',cookieString
    return cookieString

def f4mcallback(param, type, error, Cookie_Jar, url, headers):
  if type==1:
    newurl=getUrl(param,Cookie_Jar)
    oldservername=url.split('/')[2]
    newserver=newurl.split('/')
    newserver[2]=oldservername
    newurl='/'.join(newserver)
    return newurl,Cookie_Jar
  else:
    return '',None

def getUrl(param, Cookie_Jar):
  import requests, re, urllib, inspect
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'}
  url = 'http://www.filmon.com/tv/channel/export?channel_id='+param
  session = requests.session()
  session.cookies = Cookie_Jar
  source= session.get(url, headers = headers)
  swf = re.findall('streamer":"(.*?)"', source.text)[0]
  cleanswf = swf.replace('\\/','/')
  referer = 'http://www.filmon.com' + cleanswf
  refpage = 'https://www.filmon.com/'
  page = requests.get(refpage)
  headers1 = {'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0', 'Referer': refpage, 'X-Requested-With': 'XMLHttpRequest', 'Cookie': str(page.cookies)}
  params = {'channel_id': param, 'quality': 'high'}
  url2 = 'https://www.filmon.com/ajax/getChannelInfo'
  source1 = requests.post(url2, params=params, headers=headers1).text
  return re.findall('"high","url":"([^"]+)"', source1)[0].replace('\/', '/')
 
def GetLSProData(page_data,Cookie_Jar,m):
  import os,urllib
  callbackfunction=os.path.realpath(__file__)
  callbackparam='20'
  url=getUrl('20',Cookie_Jar)
  referer = 'http://www.filmon.com/'
  print 'url',url
  return urllib.quote_plus (url + '|Referer=' + referer+'&amp;cookie='+getCookiesString(Cookie_Jar)+'&amp;User-Agent=Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36') +'&amp;callbackpath='+urllib.quote_plus(callbackfunction)+'&amp;callbackparam='+urllib.quote_plus(callbackparam)
]]></expres>
<page></page>
<cookieJar></cookieJar>
 <thumbnail>https://upload.wikimedia.org/wikipedia/commons/thumb/4/45/Food_Network_Logo.svg/500px-Food_Network_Logo.svg.png</thumbnail>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
918
401
63
USA
change this to see it works

LSP XML:
def getUrl(param, Cookie_Jar):
  import requests, re, urllib, inspect
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'}
  url = 'http://www.filmon.com/tv/channel/export?channel_id=20'
  session = requests.session()
  session.cookies = Cookie_Jar
  source= session.get(url, headers = headers)
  swf = re.findall('streamer":"(.*?)"', source.text)[0]
  cleanswf = swf.replace('\\/','/')
  referer = 'http://www.filmon.com' + cleanswf
  refpage = 'https://www.filmon.com/'
  headers1 = {'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0', 'Referer': url, 'X-Requested-With': 'XMLHttpRequest', 'Cookie': str(page.cookies)}
  params = {'channel_id': '20', 'quality': 'high'}
  url2 = 'https://www.filmon.com/ajax/getChannelInfo'
  source1 = requests.post(url2, data=params, headers=headers1).text
  return re.findall('"high","url":"([^"]+)"', source1)[0].replace('\/', '/')
 

Doom

Member
Sep 16, 2019
272
21
18
@streamwatcher2013 Can get a fix seems the page made a change & thanks!
<item>
<title>crackstreams.com</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
link=re.findall('<iframe.+?src="([^"]+)',page_data)[0]
source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'http://crackstreams.com/mmastreams/watch-ufc-holm-vs-aldana/','accept':'*/*'}).content
return re.findall('(?s)source:\s"([^"]*)',source)[0]
]]></expres>
<page>http://crackstreams.com/mmastreams/watch-ufc-holm-vs-aldana/</page>
</regex>
</item>
 

redota

New member
Jul 3, 2016
23
2
3
PLEASE PLEASE

is possible regex for this link for use in lsp ,really apreciatted you help thank you guys
[codehttp://vtvuruguayenvivohd.blogspot.com/[/code]
 

arslion84

New member
Dec 31, 2015
6
0
1
Hi all

can anybody helpme they dosent works more..
XML:
<item>
<title>[COLOR orange]===  TV Liste  ===[/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2][/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
 return re.findall('href="(.*?)".title="([^"]+)',re.findall('id="channels">(?s)(.*?)</ul',page_data)[0])
]]></expres>
<page>http://canlitvizle.com/</page>
</regex>
<regex>
<name>link</name>
<expres><![CDATA["player-inner"[\w\W]*?[\'"](h[^\'"]+)]]></expres>
<page>[makelist.param1]</page>
<referer>http://canlitvizle.com/</referer>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
from AADecoder import AADecoder
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
 inf=re.findall('script>([^<]+)[\w\W]*?file.+?\+[\'"]([^\'"]+)',page_data)[0]
 html=re.findall("=\s*'([^']+).+?\s+'([^']+)",AADecoder(inf[0]).decode())[0]
 return html[0]+inf[1]+html[1]+'|User-Agent=iPad&Referer=$doregex[link]'
]]></expres>
<page>$doregex[link]</page>
<referer>[makelist.param1]</referer>
</regex>
<fanart></fanart></item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
918
401
63
USA
replace the getUrl section

LSP XML:
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,unwise
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  while 'w,i,s,e' in page_data:
      page_data = unwise.unwise_process(page_data)
  return re.findall('{file:\s*[\'"]([^\'"]+)',page_data)[0]+'|user-agent=ipad&referer=$doregex[link]'
]]></expres>
<page>$doregex[link]</page>
<referer>[makelist.param1]</referer>
</regex>
 
  • Like
Reactions: arslion84

DerWolf

Member
Nov 20, 2019
43
5
8
hxxps://pluto.tv/live-tv/cc-pluto-tv-de?utm_source=google&utm_medium=textsearch&utm_campaign=1000007&utm_content=10000083&gclid=Cj0KCQjwt4X8BRCPARIsABmcnOrpXfKqMrNqo1y3Mr42q9gqJ93FmnVJIRzGU8cYFJMMNszDy1bdQ0oaAhcIEALw_wcB

can you help me this site a makelist please thanks
 

coolstud

New member
Oct 17, 2012
21
2
3

streamwatcher2013

Well-known member
Oct 24, 2013
918
401
63
USA
@coolstud

You been here long enough to knew the rule of forum was not allow to post the live url. Put them in </>code mode
Try this

LSP XML:
<item>
<title>Kurulus Osman Season 1 Episode 10</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m,host='osman.gigastream.xyz'):#streamwatcher2013
  link=re.findall('<iframe src="([^"]+)',page_data)[0]
  s=requests.get(link,headers={'user-agent':'Mozilla/5.0','host':host,'referer':'https://osmanonline.co.uk/watch-kurulus-osman-season-1-episode-10-with-english-subtitles/','accept':'*/*'})
  path=re.findall('"hostList":.+?videoUrl":"([^"]+)',s.content)[0].replace('\\','')
  furl='https://%s%s?s=cdn1&d=' %(host,path)
  source=requests.get(furl,headers={'user-agent':'Mozilla/5.0','host':host,'referer':link,'accept':'*/*'},cookies=s.cookies).content
  if 'x1080' in source:
    return re.findall('1920x.+\n(.*)',source)[0]+'|user-agent=ipad&referer='+link
  elif 'x720' in source:
    return re.findall('1280x.+\n(.*)',source)[0]+'|user-agent=ipad&referer='+link
  else:
    return re.findall('x480\n(.*)',source)[0]+'|user-agent=ipad&referer='+link
]]></expres>
<page>https://osmanonline.co.uk/watch-kurulus-osman-season-1-episode-10-with-english-subtitles/</page>
</regex>
<thumbnail>https://osmanonline.co.uk/wp-content/uploads/2020/02/3224234-780x405.jpg</thumbnail>
</item>
 
  • Like
Reactions: altug

coolstud

New member
Oct 17, 2012
21
2
3
Hi streamwatcher2013

I am very sorry, I completely forgot. I haven't visited this website since the last time I requested help which 8 months ago.

Thank you for the fix.

(Please can a moderator change the link to code as I cannot edit it.)
 

coolstud

New member
Oct 17, 2012
21
2
3
Hi streamwatcher2013

I tried the regex above but it doesn't work, I get the error message in debug mode below.

Code:
21:06:32.710 T:18446744071850264864   DEBUG: Loading settings for $doregex[getUrl]|regex=326eaed1b60d5678cde4bf2dd13f6712
21:06:32.721 T:18446744071850264864   DEBUG: CPlayerCoreFactory::GetPlayers($doregex[getUrl]|regex=326eaed1b60d5678cde4bf2dd13f6712)
21:06:32.721 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
21:06:32.721 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
21:06:32.721 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: mms/udp
21:06:32.721 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
21:06:32.721 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtmp
21:06:32.721 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
21:06:32.721 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
21:06:32.721 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
21:06:32.721 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
21:06:32.722 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
21:06:32.722 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
21:06:32.722 T:18446744071850264864   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: radio
21:06:32.722 T:18446744071850264864   DEBUG: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
21:06:32.722 T:18446744071850264864   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (1)
21:06:32.722 T:18446744071850264864   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
21:06:32.722 T:18446744071850264864   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
21:06:32.722 T:18446744071850264864   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
21:06:32.722 T:18446744071850264864   DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
21:06:32.725 T:18446744071850264864   DEBUG: Radio UECP (RDS) Processor - new CDVDRadioRDSData
21:06:32.725 T:18446744071850264864  NOTICE: DVDPlayer: Opening: $doregex[getUrl]|regex=326eaed1b60d5678cde4bf2dd13f6712
21:06:32.725 T:18446744071850264864 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
21:06:32.725 T:18446744071850264864   DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
21:06:32.726 T:18446744071850264864   DEBUG: LinuxRendererGL: Cleaning up GL resources
21:06:32.726 T:18446744071742929184   DEBUG: Thread DVDPlayer start, auto delete: false
21:06:32.729 T:18446744071742929184  NOTICE: Creating InputStream
21:06:32.730 T:18446744071742929184   ERROR: CVideoPlayer::OpenInputStream - error opening [$doregex[getUrl]|regex=326eaed1b60d5678cde4bf2dd13f6712]
21:06:32.730 T:18446744071742929184  NOTICE: CDVDPlayer::OnExit()
21:06:32.730 T:18446744071742929184   DEBUG: OnPlayBackStopped: play state was 1, starting 1
21:06:32.730 T:18446744071742929184   DEBUG: Thread DVDPlayer 18446744071742929184 terminating
21:06:32.730 T:18446744071850264864   DEBUG: OnPlayBackStopped: play state was 3, starting 0
21:06:32.745 T:18446744071850264864   DEBUG: CAnnouncementManager - Announcement: OnStop from xbmc
21:06:32.745 T:18446744071850264864   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnStop
21:06:32.751 T:18446744071850264864  NOTICE: CDVDPlayer::CloseFile()
 

streamwatcher2013

Well-known member
Oct 24, 2013
918
401
63
USA
Seem like not from my post code. The error shows below does not same <link>

Opening: $doregex[getUrl]|regex=326eaed1b60d5678cde4bf2dd13f6712

Mine does not have parameter |regex=................ following $doregex[getUrl]
 

tpoupi

Member
Jan 2, 2016
32
0
6
Hi guru, please need help to regex.
hvvps://www.dbm-tv.fr/dbm-live/
 

streamwatcher2013

Well-known member
Oct 24, 2013
918
401
63
USA
Try this:

LSP XML:
<item>
<title>DBM TV</title>
<inputstream>$doregex[getUrl]$$lic=https://x.sports24.site/license/sfr|origin=https://sports24.club&amp;referer=https://sports24.club/|R{SSM}|</inputstream>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  ref=re.findall('<iframe\s*src="(.+?channel[^"]+)',page_data)[0];link=ref.replace('?channel','/playerConfig.php?channel')
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':ref,'accept':'*/*'}).content.replace('\\','')
  return re.findall('"ios","url":"([^"]+)',source)[0]+'|user-agent=VLC&referer='+link
]]></expres>
<page>https://www.dbm-tv.fr/dbm-live/</page>
</regex>
<thumbnail>https://www.dbm-tv.fr/wp-content/uploads/2017/12/logo-dbm.png</thumbnail>
</item>
 
  • Like
Reactions: tpoupi

altug

Member
Jul 7, 2016
70
2
8
can you help me this site a makelist please, des dont work thankyou

<item>
<title>>>>>>[COLOR red]Diziler[/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR lightskyblue][makelist.param2][/COLOR]</title>
<link>$doregex[cristal]</link>
<thumbnail></thumbnail>
<fanart></fanart>
]]></listrepeat>
<expres><![CDATA[(?s)<a href="(.*?)">(.*?)<]]></expres>
<page>https://iptvpro93.github.io/dizi/index.html</page>
</regex>
<regex>
<name>cristal</name>
<listrepeat><![CDATA[
<title>[COLOR lightskyblue][cristal.param2][/COLOR]</title>
<link>https://iptvpro93.github.io/dizi/index.html[makelist.param1][cristal.param1]</link>
<thumbnail></thumbnail>
<fanart></fanart>
]]></listrepeat>
<expres><![CDATA[(?s)<a href="(.*?)">(.*?)<]]></expres>
<page>https://iptvpro93.github.io/dizi/index.html[makelist.param1]</page>
</regex>
</it
 

altug

Member
Jul 7, 2016
70
2
8
the list is there but it doesn't play what has to end there

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

streamwatcher2013

Well-known member
Oct 24, 2013
918
401
63
USA
your list below 100 eps. No need that code

Try this:
LSP XML:
<item>
<title>DIRILIS OSMAN TüM BÖLÜMLER</title>
<thumbnail>https://pbs.twimg.com/media/EJKItgUWoAA2k9p?format=png&name=900x900</thumbnail>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param1] [COLOR cyan]([makelist.param2])[/COLOR]</title>
  <info>[makelist.param3]</info>
  <urlsolve>https://www.youtube.com/watch?v=[makelist.param4]</urlsolve>
  <thumbnail>https://i.ytimg.com/vi/[makelist.param4]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import requests
def GetLSProData(page_data, Cookie_Jar, m, list='PLUoieYEPHsenWJWE31crSybb_CRb1D8YS'):
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0'}
  page_data=requests.get('https://www.youtube.com/list_ajax?style=json&action_get_list=1&list={}&index=1'.format(list), headers=headers).json()
  items = page_data.get('video')
  events=[]
  for item in items:
    title = item.get('title')
    vid = item.get('encrypted_id')
    info = item.get('description')
    length = item.get('duration')
    thumb = item.get('thumbnail').replace('default', 'hqdefault')
    events.append((title, length, info, vid, thumb))
  return events
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: altug

coolstud

New member
Oct 17, 2012
21
2
3
@streamwatcher2013

can you make the same makelist for the website below as it has english subtitles hardcoded the youtube list doesn't.

Code:
https://osmanonline.co.uk/dirilis-osman/
The previous code you made above in my post,

Code:
https://www.tvaddons.co/community/threads/lsp-regex-makelist-discussion.62925/post-437058
I noticed it only works for episode 10 but not the other episodes.

Thank you!
 

streamwatcher2013

Well-known member
Oct 24, 2013
918
401
63
USA
@coolstud
For Forward or Backward function on player you need to ask Kodi's developers thread. Try this for makelist:

LSP XML:
<item>
<title>Kurulus Osman with English Subtitles</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>https://osmanonline.co.uk/wp-content/uploads/2019/05/osmanlogo.jpg</thumbnail>
  <fanart>https://osmanonline.co.uk/wp-content/uploads/2020/08/watch-kurulus-osman-with-english-subtitles.jpg</fanart>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  return re.findall('href.+?(//.+?subtitles).+class.+?>([^<]+)',re.findall('class="entry-content entry clearfix">(?s)(.*?)<script',page_data)[0])
]]></expres>
<page>https://osmanonline.co.uk/dirilis-osman/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m,host='osman.gigastream.xyz'):#streamwatcher2013
  link=re.findall('src="(.+?player[^"]+)',page_data)[0]
  s=requests.get(link,headers={'user-agent':'Mozilla/5.0','host':host,'referer':'https:[makelist.param1]/','accept':'*/*'})
  path=re.findall('"hostList":.+?videoUrl":"([^"]+)',s.content)[0].replace('\\','')
  furl='https://%s%s?s=cdn1&d=' %(host,path)
  source=requests.get(furl,headers={'user-agent':'Mozilla/5.0','host':host,'referer':link,'accept':'*/*'},cookies=s.cookies).content
  if 'x1080' in source:
    return re.findall('1920x.+\n(.*)',source)[0]+'|user-agent=ipad&referer='+link
  elif 'x720' in source:
    return re.findall('1280x.+\n(.*)',source)[0]+'|user-agent=ipad&referer='+link
  else:
    return re.findall('x480\n(.*)',source)[0]+'|user-agent=ipad&referer='+link
]]></expres>
<page>https:[makelist.param1]/</page>
</regex>
<thumbnail>https://osmanonline.co.uk/wp-content/uploads/2019/05/osmanlogo.jpg</thumbnail>
<fanart>https://osmanonline.co.uk/wp-content/uploads/2020/08/watch-kurulus-osman-with-english-subtitles.jpg</fanart>
</item>
 

coolstud

New member
Oct 17, 2012
21
2
3
They have changed something again the the links don't play, also they have multiple source and previously it would only pick the lowest resolution not 1080p.

Please can you fix this again.
 

thingy

Member
May 9, 2018
58
0
6
is it possible to help me with a regex for this site?
Code:
hxxp://www.mi-television.com/
 

streamwatcher2013

Well-known member
Oct 24, 2013
918
401
63
USA
It's in source code

LSP XML:
<div id="clappr" style="margin-left: calc(50% - 567px);">
</div>
<script>
var player = new Clappr.Player({
source: "http://162.244.80.176:8081/abr/stream/playlist.m3u8",
poster: "https://picsum.photos/200/300",
parentId: "#clappr",
width: 1135,
height: 700,
plugins: [LevelSelector],
levelSelectorConfig: {
    title: 'Quality',
    labels: {
        2: 'High', // 500kbps
        1: 'Med', // 240kbps
        0: 'Low', // 120kbps
    },
    labelCallback: function(playbackLevel, customLabel) {
        return customLabel + playbackLevel.level.height+'p'; // High 720p
    }
  },
});
</script>
the regex should be

LSP XML:
Clappr.Player[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)

or

id=.clappr[\w\W]*?(?:source|src|file):\s*[\'"]([^\'"]+)
 

dantas1990

Member
Apr 10, 2020
55
1
8
hello guys ,its possible regex for this link for lsp thanks

hxxps://mega.nz/file/zm5iVCrA#bAjSAIuV2L7upD3EN0lSWIPPok2Az7DGb0bekN4j_rE
hxxps: //pandafiles.com/0yqrqgu436kf/DW.S09E01.MP4.DUB.BaixarSeriesMP4.Com.mp4
 

tungbeng95

Member
Oct 25, 2018
366
11
18
@streamwatcher2013 can help me this:
HTML:
https://www.ceskatelevize.cz/ivysilani/zive/ct3/
 

jamers

New member
Jun 29, 2018
24
0
1
Hi, How I can play this link on livestreamspro ?

hxxp://www.tvsportstvdez.com/cmtv-online-gratis/

Thank you
 
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5