Help for Regex

Status
Not open for further replies.

jujuuj

New member
Feb 25, 2015
27
0
1
http
WOW !! i' have to try this ! ...

Thanks a lot streamwatcher ...



Try this:

how to play live youtube video

Code:
<item>
<title>KTN Kenya NEWS</title>
<link>https://www.tvaddons.co/forums/$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):# streamwatcher2013
  return 'plugin://plugin.video.youtube/play/?video_id='+re.findall('feature=c4-live-promo".*?watch\?v=(.*?)".*?LIVE',requests.get('https://www.youtube.com/channel/UCkWr5PLM8hp8M4WNIkjpKsQ').content.decode('ascii','ignore'))[0]
]=]=></expres>
<page></page>
</regex>
<thumbnail>https://yt3.ggpht.com/-4c3BpnVtuLw/AAAAAAAAAAI/AAAAAAAAAAA/VTedIif8Pyc/s288-mo-c-c0xffffffff-rj-k-no/photo.jpg</thumbnail>
</item>
 

jujuuj

New member
Feb 25, 2015
27
0
1
http
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!

Hello all,

I Just want to say THANK YOU SOOOOO MUCH to GUJAL for this new version, and the very useful work on CF.py
 

jujuuj

New member
Feb 25, 2015
27
0
1
http
I changed that, but it still does not work. I do not understand that.


<item>
<title>NaGe</title>
<link>https://www.tvaddons.co/forums/$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#EAREW
info=re.search('"tv-play".data-src="(h.*)embed.*?(token.*?)(?:\n|")',page_data);return info.group(1)+'index.m3u8?'+info.group(2)+'|User-Agent=iPad'
]=]=></expres>
<page>hxxp://www.tata.to/channel/natgeo-wild</page>
<agent>iPad</agent>
</regex>
</item>
te explico ... esto : #EAREW no tiene nada que hacer en el codigo, porque el creadord es streamwatcher and is not EAR tv (costarica)
, y la lista eartv, cuando copia un regex de aqui (o de alla) para ponerlo en una lista abierta, gratuita, sobre cargada en usuarios y ademas en en pastebin publico, ni siquiera con opcion UNLISTED ... pues .. esto destruye el trabajo de los demas.

al parecer ? todavia esta el espacio entre la R y la E de return ...
para poner codigo en el foro (sin problema de espacio ni nada), hay que usar la balisa
Code:
  y [/co de] al final   (sin espacio)

saludos .. y ojala EAR pasa sus paste en unlisted porque esta saliendo todo en google ... mientras tanto ...
 
Last edited:

streamwatcher2013

Well-known member
Oct 24, 2013
849
352
63
USA
I'm sorry I did not know it's offline. Once the stream is back online I will test the code again. Could you maybe help me with this link as an alternative?

Code:
http://www.kostenloslivetv.com/rtl/
I don't mind when you use my code for ev1 but instead put your name in there just removed it
Try this

Code:
<item>
<title>RTL</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
def GetLSProData(page_data,Cookie_Jar,m):
  url=re.findall('iframe.src="(.*?)"',requests.get('http://www.kostenloslivetv.com/rtl/',headers={'User-Agent':'your bot 0.1'}).content.decode('ascii','ignore'))[0]
  source=requests.get(url,headers={'Referer':'http://www.kostenloslivetv.com/rtl/','User-Agent':'your bot 0.1'}).content.decode('ascii','ignore')
  return base64.b64decode(re.findall('webhdiptv\("(.*?)"',source)[0][::-1]+'==')+'|Referer=http://www.kostenloslivetv.com/rtl/&User-Agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0'
]]></expres>
<page></page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
849
352
63
USA
WOW !! i' have to try this ! ...

Thanks a lot streamwatcher ...
Welcome back @jujuuj. I don't know youtube plugin will pick the higher stream resolution? But here the one will pick the higher resolution if the stream has it

Code:
<item>
<title>KTN Kenya NEWS</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.youtube.com/watch?v='+re.findall('feature=c4-live-promo".*?watch\?v=(.*?)".*?LIVE',requests.get('https://www.youtube.com/channel/UCkWr5PLM8hp8M4WNIkjpKsQ').content.decode('ascii','ignore'))[0]
  source=requests.get(url).content.decode('ascii','ignore').replace('\\u0026','&').replace('\\','');source=requests.get(re.findall('hlsvp":"(.*?)"',source)[0]).content.decode('ascii','ignore').replace('\\u0026','&').replace('\\','')
  if '1080' in source:
    return re.findall('x1080.*\n(.*)',source)[0]+'|User-Agent=iPad'
  elif '720' in source:
    return re.findall('x720.*\n(.*)',source)[0]+'|User-Agent=iPad'
  elif '480' in source:
    return re.findall('x480.*\n(.*)',source)[0]+'|User-Agent=iPad'
]]></expres>
<page></page>
</regex>
<thumbnail>https://yt3.ggpht.com/-4c3BpnVtuLw/AAAAAAAAAAI/AAAAAAAAAAA/VTedIif8Pyc/s288-mo-c-c0xffffffff-rj-k-no/photo.jpg</thumbnail>
</item>
 

Alperio

New member
May 6, 2017
17
0
0
@Streamwatcher2013

I did not change your name. That was the other friend :) but he has already apologized for that. I used the code exactly like that, but it does not work either.

Code:
 <item> 
<title>RTL</title> <link>$doregex[getUrl]</link> <regex> <name>getUrl</name> <expres><![CDATA[#$pyFunction import re,requests,base64 def GetLSProData(page_data,Cookie_Jar,m): url=re.findall('iframe.src="(.*?)"',requests.get('http://www.kostenloslivetv.com/rtl/',headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0'}).content.decode('ascii','ignore'))[0] source=requests.get(url,headers={'Referer':'http://www.kostenloslivetv.com/rtl/','User-Agent':'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0'}).content.decode('ascii','ignore') return base64.b64decode(re.findall('webhdiptv\("(.*?)"',source)[0][::-1]+'==')+'|Referer=http://www.kostenloslivetv.com/rtl/&User-Agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0' ]]></expres> <page></page> </regex>
 </item>
 

jujuuj

New member
Feb 25, 2015
27
0
1
http
Code:
 <item> 
<title>RTL</title> <link>$doregex[getUrl]</link> <regex> <name>getUrl</name> <expres><![CDATA[#$pyFunction import re,requests,base64 def GetLSProData(page_data,Cookie_Jar,m): url=re.findall('iframe.src="(.*?)"',requests.get('http://www.kostenloslivetv.com/rtl/',headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0'}).content.decode('ascii','ignore'))[0] source=requests.get(url,headers={'Referer':'http://www.kostenloslivetv.com/rtl/','User-Agent':'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0'}).content.decode('ascii','ignore') return base64.b64decode(re.findall('webhdiptv\("(.*?)"',source)[0][::-1]+'==')+'|Referer=http://www.kostenloslivetv.com/rtl/&User-Agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0' ]]></expres> <page></page> </regex>
 </item>
This can NOT work !!

if you see in the code #$pyFunction ... that means that we leave the xml language and we start "talking PYthon3" ...
and in Python Every line, every space or non-space have its importance !
so the item here above is a non-sense ... ;) bye amigo
 

jujuuj

New member
Feb 25, 2015
27
0
1
http
Welcome back @jujuuj. I don't know youtube plugin will pick the higher stream resolution? But here the one will pick the higher resolution if the stream has it
yes :) I'm back ... actually, i wasn't so far away (toolsp.forumactif.com) ... but I had no idea that this 'activity' had kept on here, as it wasn't supposed to, one year ago. But I am happy to see that it has survived, and so hurry to try the gujal's update too !

Definitly a good week ... :)
bye streamwatcher ... glad to 'talk' to you ...'ill have a look on your item
and I may come back soon if it does not open "my" sport channel in youtube ;)
 
Last edited:

Alperio

New member
May 6, 2017
17
0
0
This can NOT work !!

if you see in the code #$pyFunction ... that means that we leave the xml language and we start "talking PYthon3" ...
and in Python Every line, every space or non-space have its importance !
so the item here above is a non-sense ... ;) bye amigo
Can you give me a working code please? I have copied the code of streamwatcher2013 and have just added user agent.
 

efradncr

Member
Mar 26, 2018
60
1
8
te explico ... esto : #EAREW no tiene nada que hacer en el codigo, porque el creadord es streamwatcher and is not EAR tv (costarica)
, y la lista eartv, cuando copia un regex de aqui (o de alla) para ponerlo en una lista abierta, gratuita, sobre cargada en usuarios y ademas en en pastebin publico, ni siquiera con opcion UNLISTED ... pues .. esto destruye el trabajo de los demas.

al parecer ? todavia esta el espacio entre la R y la E de return ...
para poner codigo en el foro (sin problema de espacio ni nada), hay que usar la balisa
Code:
  y [/co de] al final   (sin espacio)

saludos .. y ojala EAR pasa sus paste en unlisted porque esta saliendo todo en google ... mientras tanto ...[/QUOTE]

Estoy de acuerdo jujuj, nunca dije que el código fuera mío lo que pasó fue que al publicar el post  me apareció que no podía publicarlo por que había contenido infringido y lo que hice fue cambiar los nombres para que saliera, no conocía el truco que dices de   [code]  y [/co de] al final   (sin espacio),.... lo siento mucho si afecté al compañero streamwc... sorry.. y lo del pastebin lo viste en un basurero de códigos (ya borrado por cierto) y si ... casi todo lo encuentras en google...
saludos..
 

turko03

Member
Mar 27, 2018
52
1
8
kann mir nimand helfen mit dem code en makelist zu machen ? es is tv programm dankeee schön jeden der das hinbekommt

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

vbprofi

Member
Feb 9, 2016
75
3
8
kann mir nimand helfen mit dem code en makelist zu machen ? es is tv programm dankeee schön jeden der das hinbekommt

hxxp://www.digiturk.com.tr/yayin-akisi
bei mir läuft keines der streams. vielleicht braucht man ein account?
 

skyrisk

New member
Apr 12, 2018
1
0
1
Please, if you can help me with this link:
Code:
https://bit.ly/2JHji9w
 
Last edited by a moderator:

gujal

Developer
Dec 26, 2013
476
245
43
Please, if you can help me with this link:
Code:
https://bit.ly/2JHji9w
Follow rules and always use code tags when posting links.
Anyway the site is georestricted. Which country is it accessible from?
Code:
Block ID: 	GEO02
Block reason: 	Access from your Country was disabled by the administrator.
Time: 	Thu Apr 12 18:41:28 2018
Server ID: 	16014
 

streamwatcher2013

Well-known member
Oct 24, 2013
849
352
63
USA
Follow rules and always use code tags when posting links.
Anyway the site is georestricted. Which country is it accessible from?
Code:
Block ID: 	GEO02
Block reason: 	Access from your Country was disabled by the administrator.
Time: 	Thu Apr 12 18:41:28 2018
Server ID: 	16014
I believe the country is Brazil and it is simple regex.

Code:
<item>
<title>AMC</title>
<link>$doregex[m3u8]</link>
<regex>
<name>m3u8</name>
<expres>source".*?"([^"]+)</expres>
<page>http://redecanais.link/player3/servercanais.php?canal=redecanais-amc&img=amc</page>
<referer>http://www.redecanais.net/assistir-amc-online-24-horas-ao-vivo_937d533e4.html</referer>
<cookieJar></cookieJar>
</regex>
</item>
 
Last edited:

turko03

Member
Mar 27, 2018
52
1
8
es sind ya auch keine streams sondern tv program es zeigt nur an was morgen heute so in Tv programmen laufen kriegt das nimand hin hier mit dem tv program?
 

vbprofi

Member
Feb 9, 2016
75
3
8
es sind ya auch keine streams sondern tv program es zeigt nur an was morgen heute so in Tv programmen laufen kriegt das nimand hin hier mit dem tv program?
ist sehr schwer, da das über javascript eingebunden wird. such dir eine andere seite, die das ohne einbindet, dann kann ich dir was basteln.
 

turko03

Member
Mar 27, 2018
52
1
8
vb profi danke für deine atwort kannst du damit was anfangen? hxxps://www.canlitv.com/yayin-akisi/ wen man jeden einzelnen sender drück komt tv programm
 
Status
Not open for further replies.