Help for Regex

Status
Not open for further replies.

streamwatcher2013

Well-known member
Oct 24, 2013
897
383
63
USA
hxxps://pastebin.com/raw/mVtQt6B0
Das Protokoll zeigt nicht an, dass der Code ausgeführt wurde. Sieh wie der Code beim Kopieren versaut war. Öffnen Sie den Pastebin Link und klicken Sie auf Download Option und speichern Sie es als ecanlitvizle.live.txt Datei. Danach benennen Sie es in ecanlitvizle.live.xml um. Hier ist die Patebin-Verbindung

Code:
https://pastebin.com/vsthxpWY
 

lord_froz

New member
Mar 9, 2018
18
0
0
They added CloudFlare to the code. You need to search in this threat for Clouflare Scrape I did posted previously (How to add the py file to LSP). The CloudFlare just get updates 17 hrs ago.


Code:
<item>
<title>http://hdtvku.com/schedule.html</title>
<link>https://www.tvaddons.co/forums/$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[makelist.param2] - [makelist.param3] ([makelist.param1] - [makelist.param4])</title>
  <link>https://www.tvaddons.co/forums/$doregex[getUrl]</link>
  <thumbnail>http://hdtvku.com/android-icon-192x192.png</thumbnail>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re,requests,cfscrape
def GetLSProData(page_data,Cookie_Jar,m):# streamwatcher2013
 scraper=cfscrape.create_scraper();source=scraper.get('http://hdtvku.com/schedule.html').content.decode('ascii','ignore');list=re.findall('id="mySidenav"(?s)(.*?)id="livechat',source)[0].replace(''','\'')
 return re.findall('<small><font.*?>(.*?)<.*?e94e38\'>(.*?)<.*?e94e38\'>(.*?)<.*?(?:font></b><br|small><br)>(\d.*?)\s.*\n.*href="(.*?)"',list)
]=]=></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re,requests,cfscrape
def GetLSProData(page_data,Cookie_Jar,m):# streamwatcher2013
 scraper=cfscrape.create_scraper();source=scraper.get('[makelist.param5]').content.decode('ascii','ignore');ref='http://hdtvku.com/'+re.findall('embed-container.*?src=[\'"]/(.*?)[\'"]',source)[0]
 return re.findall('embed-container.*?live=(.*?)[\'"]',source)[-1]+'|Referer='+ref
]=]=></expres>
<page></page>
</regex>
<thumbnail>http://hdtvku.com/android-icon-192x192.png</thumbnail>
</item>
hi, i have add cfscrape to the addon. but still not be able to play it. do i need to write something on the default.py also?
 

papaya

Member
Apr 4, 2018
42
1
8
hi master,

anyone know how to play live youtube video. im using this code but not working now

Code:
<item>
<title>KTN Kenya LIVE STREAM</title>
<thumbnail></thumbnail>
<info>Live</info>
<SetViewMode>503</SetViewMode>
<link>$doregex[url]</link>
<regex>
    <name>url</name>
    <expres>$pyFunction:'$doregex[jsonurl]'.replace('\/','/')</expres>
    <page></page>
</regex>
<regex>
    <name>jsonurl</name>
    <expres>hlsvp":"(.*?)"</expres>
    <page>https://www.youtube.com/watch?v=4i-wR_4MeUE</page>
</regex>
<thumbnail></thumbnail>
</item>
 

kabcasa

New member
Apr 28, 2015
21
0
1
At home
hi master,

anyone know how to play live youtube video. im using this code but not working now

Code:
<item>
<title>KTN Kenya LIVE STREAM</title>
<thumbnail></thumbnail>
<info>Live</info>
<SetViewMode>503</SetViewMode>
<link>https://www.tvaddons.co/forums/$doregex[url]</link>
<regex>
    <name>url</name>
    <expres>$pyFunction:'$doregex[jsonurl]'.replace('\/','/')</expres>
    <page></page>
</regex>
<regex>
    <name>jsonurl</name>
    <expres>hlsvp":"(.*?)"</expres>
    <page>https://www.youtube.com/watch?v=4i-wR_4MeUE</page>
</regex>
<thumbnail></thumbnail>
</item>
if you use youtube plugin you can try this
Code:
<item>
<title>UT2</title>
<utube>KTNClassics </utube>
</item>
with your regex
Code:
https://pastebin.com/uv7g6P4G
 

gujal

Developer
Dec 26, 2013
517
283
63
Code:
http://hdtvku.com/schedule.html
hi, i have add cfscrape to the addon. but still not be able to play it. do i need to write something on the default.py also?
LSP always had a cloudflare function and there is absolutely no need for cfscrape.py
Get LivestreamsPro v2.8.2 and use the following code. Enjoy!

Code:
<item>
<title>http://hdtvku.com/schedule.html</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>([makelist.param2]) [makelist.param1] - [makelist.param3]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>http://hdtvku.com/android-icon-192x192.png</thumbnail>
]]></listrepeat>
<expres><![CDATA[<small><font.*?>(.*?)<.*?br>(.*?)<.*?(?:font></b><br|small><br)>(\d.*?)<.*\n.*href="(.*?)"]]></expres>
<page>http://hdtvku.com/schedule.html$doregex[savecookie]</page>
<cookieJar>$doregex[createCFCookie]</cookieJar>
</regex>
<regex>
<name>createCFCookie</name>                                                     
<expres></expres>
<page>$pyFunction:cloudflare.createCookie('http://hdtvku.com/schedule.html',Cookie_Jar)</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>savecookie</name>
<expres></expres>
<page></page>
<cookieJar>save[hdtvku.lwp]</cookieJar>
</regex>
<regex>
<name>getUrl</name>
<expres>live=([^']+)</expres>
<page>[makelist.param4]</page>
<referer>http://hdtvku.com/</referer>
<cookieJar>open[hdtvku.lwp]</cookieJar>
</regex>
<thumbnail>http://hdtvku.com/android-icon-192x192.png</thumbnail>
</item>
 
Last edited:

lord_froz

New member
Mar 9, 2018
18
0
0
LSP always had a cloudflare function and there is absolutely no need for cfscrape.py
Get LivestreamsPro v2.8.2 and use the following code. Enjoy!

Code:
<item>
<title>http://hdtvku.com/schedule.html</title>
<link>https://www.tvaddons.co/forums/$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>([makelist.param2]) [makelist.param1] - [makelist.param3]</title>
  <link>https://www.tvaddons.co/forums/$doregex[getUrl]</link>
  <thumbnail>http://hdtvku.com/android-icon-192x192.png</thumbnail>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[<small><font.*?>(.*?)<.*?br>(.*?)<.*?(?:font></b><br|small><br)>(\d.*?)<.*\n.*href="(.*?)"]=]=></expres>
<page>http://hdtvku.com/schedule.html$doregex[savecookie]</page>
<cookieJar>$doregex[createCFCookie]</cookieJar>
</regex>
<regex>
<name>createCFCookie</name>                                                     
<expres></expres>
<page>$pyFunction:cloudflare.createCookie('http://hdtvku.com/schedule.html',Cookie_Jar)</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>savecookie</name>
<expres></expres>
<page></page>
<cookieJar>save[hdtvku.lwp]</cookieJar>
</regex>
<regex>
<name>getUrl</name>
<expres>live=([^']+)</expres>
<page>[makelist.param4]</page>
<referer>http://hdtvku.com/</referer>
<cookieJar>open[hdtvku.lwp]</cookieJar>
</regex>
<thumbnail>http://hdtvku.com/android-icon-192x192.png</thumbnail>
</item>
Thank you for your reply gujal.

i'm already use LivestreamsPro v2.8.2 and i get empty list using this code.
 

turko03

Member
Mar 27, 2018
52
1
8
hallo kan das jemand für mich als makelist machen danke

hxxp://www.digiturk.com.tr/yayin-akisi
 

gujal

Developer
Dec 26, 2013
517
283
63
Thank you for your reply gujal.

i'm already use LivestreamsPro v2.8.2 and i get empty list using this code.
Check your version again, are you running v2.8.2 or v2.8.1?
This is with v2.8.2


 
Last edited:
Status
Not open for further replies.