Help for Regex

Status
Not open for further replies.

gujal

Developer
Dec 26, 2013
476
245
43
Just check now. im using 2.8.1.. where i can get the 2.8.2.. i check in shani and also your repo, there are also 2.8.1?
My repo has 2.8.2 but looks like some github caching is in play. Get the zip directly if not showing
Code:
https://raw.githubusercontent.com/Gujal00/GujalKodiWork/master/zips/plugin.video.live.streamspro/plugin.video.live.streamspro-2.8.2.zip
 

cezi1

Member
Aug 1, 2017
30
1
8
Hi people, how concrete must the maxbitrate look like? He should recognize and use the highest resolution

Code:
<link>plugin://plugin.video.f4mTester/?streamtype=HLSRETRY&maxbitrate=0&url=$doregex[url]</link>

thanks
 

papaya

Member
Apr 4, 2018
42
1
8
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
Thank you kabcasa,

this code does not work with live stream

Code:
<item>
<title>UT2</title>
<utube>KTNClassics </utube>
</item>
for this one, do you know how i can set to higher max resolution?

Code:
https://pastebin.com/uv7g6P4G
[/QUOTE]
 

streamwatcher2013

Well-known member
Oct 24, 2013
853
354
63
USA
My repo has 2.8.2 but looks like some github caching is in play. Get the zip directly if not showing
Code:
https://raw.githubusercontent.com/Gujal00/GujalKodiWork/master/zips/plugin.video.live.streamspro/plugin.video.live.streamspro-2.8.2.zip
WOW I wonder I'm still running LSP 1.7.1 :(
 

cris_manya

Member
Nov 20, 2016
34
0
6
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>
Try this:

Code:
<item>
<title>KTN Kenya LIVE STREAM</title>
<link>plugin://plugin.video.youtube/play/?video_id=-t6bp9Goizo</link>
</item>
 

turko03

Member
Mar 27, 2018
52
1
8
kann mir nimand helfen mit dem code en makelist zu machen ?

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

streamwatcher2013

Well-known member
Oct 24, 2013
853
354
63
USA
1.71. is like 2 years old! 2.8.1 was the last release in TVA.ag repo and even that was released a year ago. Why are you still on 1.7.1 @streamwatcher2013
LOL That why I wonder when doing some code it wont play with LSP. I did not pay attention much on LSP. This part just for fun and have some challenging. :)
 

streamwatcher2013

Well-known member
Oct 24, 2013
853
354
63
USA
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>
Try this:

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
  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>
 

kabcasa

New member
Apr 28, 2015
21
0
1
At home
Thank you kabcasa,

this code does not work with live stream

Code:
<item>
<title>UT2</title>
<utube>KTNClassics </utube>
</item>
for this one, do you know how i can set to higher max resolution?

Code:
https://pastebin.com/uv7g6P4G
[/QUOTE]

You should install youtube plugin on kodi addon repo
 

cris_manya

Member
Nov 20, 2016
34
0
6
Hi Guys!
you could help me with regex of this site:
Code:
hxxp://sport-stream365.com/football
thanks in advance
 

efradncr

Member
Mar 26, 2018
60
1
8
Code:
https://www.tata.to/channel/natgeo-wild
<item>
<title>NaGe</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$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>
 

Alperio

New member
May 6, 2017
17
0
0
<item>
<title>NaGe</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$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>
Hmmm I tried, but it did not work. What am I doing wrong?
 

Alperio

New member
May 6, 2017
17
0
0
It was my code. Don't replace my name in it. The code won't work cause a space in between r and e of return

I changed that, but it still does not work. I do not understand that.


<item>
<title>NaGe</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$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>
 

streamwatcher2013

Well-known member
Oct 24, 2013
853
354
63
USA
I changed that, but it still does not work. I do not understand that.


<item>
<title>NaGe</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$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>
You did not changed it. Still have space between both letter r and e. Also the url must be http
Anyway the stream is downed

Try this

Code:
<item>
<title>NaGe</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#[COLOR="#FF0000"]YOU CAN DELETE MY NAME BUT DO NOT REPLACE BY YOUR NAME[/COLOR]
  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>http://www.tata.to/channel/natgeo-wild</page>
<agent>iPad</agent>
</regex>
</item>
 

efradncr

Member
Mar 26, 2018
60
1
8
You did not changed it. Still have space between both letter r and e. Also the url must be http
Anyway the stream is downed

Try this

Code:
<item>
<title>NaGe</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#[COLOR="#FF0000"]YOU CAN DELETE MY NAME BUT DO NOT REPLACE BY YOUR NAME[/COLOR]
  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>hxxtp://www.tata.to/channel/natgeo-wild</page>
<agent>iPad</agent>
</regex>
</item>


I'm sorry streamwatcher2013, I did it because it would not let me put names with protection and I changed both, and if it's your code I'm sorry, I tried to help the friend
 

Alperio

New member
May 6, 2017
17
0
0
You did not changed it. Still have space between both letter r and e. Also the url must be http
Anyway the stream is downed

Try this

Code:
<item>
<title>NaGe</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#[COLOR="#FF0000"]YOU CAN DELETE MY NAME BUT DO NOT REPLACE BY YOUR NAME[/COLOR]
  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>http://www.tata.to/channel/natgeo-wild</page>
<agent>iPad</agent>
</regex>
</item>
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/
 
Status
Not open for further replies.