Help for Regex

Status
Not open for further replies.

tnico

New member
May 29, 2015
20
0
1
hi guru, can you help me please. Thank

hyyps://www.firstonetv.net/Live/Canada/The-Sports-Network-2-(TSN-2)-13
 

kavan

Member
Aug 14, 2016
67
5
8
Hi streamwatcher2013
can you help me please
I need regex for this:
Code:
arabtvz.com/video-elements/mbc1/index.html
Thank you very much!
 

streamwatcher2013

Well-known member
Oct 24, 2013
897
383
63
USA
can you look at this, the tsreams are not starting:

Code:
<item>
<title>canlitvlive.co</title>
<link>$doregex[makelist]</link>
<thumbnail></thumbnail>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param2]</title>
<link>$doregex[getURL]|User-Agent=iPhone</link>
<thumbnail>[makelist.param3]</thumbnail>
]]></listrepeat>
<expres>(?s)li class="ondeiz" data-uri=.*?href="(.*?)".*?title="(.*?)".*?src="(.*?)"</expres>
<page>http://www.canlitvlive.co/tum-kanallar.html</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>getURL</name>
<expres>file:"(.+?)"</expres>
<page>http://www.canlitvlive.co[makelist.param1]</page>
<cookieJar></cookieJar>
</regex>
<fanart></fanart>
</item>
Replaced with either:

Code:
<name>getURL</name>
<expres>file.*?"([^"]+)</expres>

<name>getURL</name>
<expres>file.*?"(h.*m3u8.*?)"</expres>
 

streamwatcher2013

Well-known member
Oct 24, 2013
897
383
63
USA
some guru can help me to make regex. Thank so much

htpp://latino-webtv.com/ESPN-2-en-vivo/
Try to see it may working for u. It's playing with Kodi 17.6 on Windows base

Code:
<item>
<title>ESPN 2</title>
<link>http://latinowebtv.ml/live_3.m3u8?token=U2FsdGVkX189EbEokuXE%2BPOpzl%2B%2FLO90sf47pk2XOLAV7KFrkyW8pxPY1TbZ3u%2BL</link>
</item>
 
Last edited:

gujal

Developer
Dec 26, 2013
517
283
63
Hi streamwatcher2013
can you help me please
I need regex for this:
Code:
arabtvz.com/video-elements/mbc1/index.html
Thank you very much!
Wow very nice HD Stream


However this is Microsoft Smoothstreaming stream, so won't work in lsp
This will work perfectly in Kodi 17.6 if you put the following text in a file with .strm extension and open the file in kodi as if you are playing a video
Code:
#KODIPROP:inputstreamaddon=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=ism
http://livecdnh2.tvanywhere.ae/ss/mbc1.isml/Manifest
 

tobotminer

Member
Jan 26, 2018
49
4
8
Hi all master,

anyone can help me get this regex. i really like to watch it on lsp

Code:
hxxp://kissdrama.club/mr-right
 

kavan

Member
Aug 14, 2016
67
5
8
#KODIPROP:inputstreamaddon=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=ism
Code:
livecdnh2.tvanywhere.ae/ss/mbc1.isml/Manifest
Hi gujal Thank you
:(
it doesn't work for me
 

gujal

Developer
Dec 26, 2013
517
283
63
Code:
#KODIPROP:inputstreamaddon=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=ism
http://livecdnh2.tvanywhere.ae/ss/mbc1.isml/Manifest
Hi gujal Thank you
:(
it doesn't work for me
As I specifically said, put all three lines in a file called lets say mbc.strm
You must run inside Kodi 17.6
You must have inputstream.adaptive enabled (by default on Kodi 17.6 install, it is disabled)
Once you satisfy the above three conditions it will work as I even posted the screenshot of it working above
 

kavan

Member
Aug 14, 2016
67
5
8
As I specifically said, put all three lines in a file called lets say mbc.strm
You must run inside Kodi 17.6
You must have inputstream.adaptive enabled (by default on Kodi 17.6 install, it is disabled)
Once you satisfy the above three conditions it will work as I even posted the screenshot of it working above
Perfect
Thank you so much

 

hugoladeira

New member
Jan 9, 2014
6
0
0
Hi Guys,

I hope you are well.

I'm trying to understand the "wise" and the "packed" decoding.

For the following example:
Code:
hxxp://footdirect24.com/id.php?channel=2
I understand that from the page:

Code:
hxxp://baroyster.xyz/hls_zona.php?id=29321&width=100%&height=100%
we need to get

Code:
eval(function(w,i,s,e){var lIll=0;var ll1I=0;var Il1l=0;var ll1l=;var l1lI=;while(true){if(lIll<5)l1lI.push(w.charAt(lIll));else if(lIll<w.length)ll1l.push(w.charAt(lIll));lIll++;if(ll1I<5)l1lI.push(i.charAt(ll1I));else if(ll1I<i.length)ll1l.push(i.charAt(ll1I));ll1I++;if(Il1l<5)l1lI.push(s.charAt(Il1l));else if(Il1l<s.length)ll1l.push(s.charAt(Il1l));Il1l++;if(w.length+i.length+s.length+e.length==ll1l.length+l1lI.length+e.length)break;}var lI1l=ll1l.join('');var I1lI=l1lI.join('');ll1I=0;var l1ll=;for(lIll=0;lIll<ll1l.length;lIll+=2){var ll11=-1;if(I1lI.charCodeAt(ll1I)%2)ll11=1;l1ll.push(String.fromCharCode(parseInt(lI1l.substr(lIll,2),36)-ll11));ll1I++;if(ll1I>=l1lI.length)ll1I=0;}return l1ll.join('');}('m3q01202k3x3u37242t323p112038251s27332z16212.......844e1df2'));
But how can I decode this text to get the stream line ?

I have tried to execute the unwise.py file in python, but with no results....

Thnak you in advance
 

streamwatcher2013

Well-known member
Oct 24, 2013
897
383
63
USA
You can use online tool to unpack the w,i,s,e code and see it contains the playable stream or not

Code:
www.strictly-software.com/unpack-javascript.aspx
If it had then you can use this regex (LSP) to encoded it
Code:
<regex>
<name>unWise</name>
<expres>$pyFunction:get_unwise("eval\(function\(w,i,s,e\).*}\((.*?)\)")</expres>
<page></page>
</regex>
 
Last edited:

hugoladeira

New member
Jan 9, 2014
6
0
0
Brilliant!

Thanks Streamwatcher

However what am I doing wrong here:

Code:
<item>
<title>SPORT.TV2 RegEx **hxxp://footdirect24.com/id.php?channel=2</title>
<link>$doregex[get-url]</link>
<regex>
<name>get-url</name>
<expres>player.load.*\D.*file: "(.*?)"</expres>
<page>$doregex[get-unpacked]</page>
</regex>
<regex>
<name>get-unpacked</name>
<expres>$pyFunction:get_unwise("eval\(function\(w,i,s,e\).*}\((.*?)\)")</expres>
<page>hxxp://baroyster.xyz/hls_zona.php?id=29321&width=100%&height=100%</page>
<referer>hxxp://footdirect24.com/ch2/live2.php</referer>
</regex>
</item>
Thank you in advance
 

streamwatcher2013

Well-known member
Oct 24, 2013
897
383
63
USA
Brilliant!

Thanks Streamwatcher

However what am I doing wrong here:

Code:
<item>
<title>SPORT.TV2 RegEx **hxxp://footdirect24.com/id.php?channel=2</title>
<link>https://www.tvaddons.co/forums/$doregex[get-url]</link>
<regex>
<name>get-url</name>
<expres>player.load.*\D.*file: "(.*?)"</expres>
<page>$doregex[get-unpacked]</page>
</regex>
<regex>
<name>get-unpacked</name>
<expres>$pyFunction:get_unwise("eval\(function\(w,i,s,e\).*}\((.*?)\)")</expres>
<page>hxxp://baroyster.xyz/hls_zona.php?id=29321&width=100%&height=100%</page>
<referer>hxxp://footdirect24.com/ch2/live2.php</referer>
</regex>
</item>
Thank you in advance
You can use either and beware the source has (2) eval(function(w,i,s,e), have to get the bottom one

Code:
<expres>(?s)player.load.*?"(h.*?)"</expres>
or
<expres>player.load.*\n.*\n.*"(h.*?)"</expres>
 
Last edited:

tpoupi

Member
Jan 2, 2016
32
0
6
some one can help me please. thank so much

hxxp://www.bfmtv.com/mediaplayer/live-video/
 

gujal

Developer
Dec 26, 2013
517
283
63
some one can help me please. thank so much
hxxp://www.bfmtv.com/mediaplayer/live-video/
Enjoy!

Code:
<item>
<title>BFM TV</title>
<link>$doregex[url]</link>
<thumbnail>http://www.bfmtv.com/static/nxt-bfmtv/info/img/logoportail-carreV3-blanc.png</thumbnail>
<regex>
<name>url</name>      
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import re, requests
 acc = re.findall('data-account="([^"]+)',page_data)[0]
 pid = re.findall('data-player="([^"]+)',page_data)[0]
 vid = re.findall('data-video-id="([^"]+)',page_data)[0]
 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0',
            'Referer': 'http://www.bfmtv.com/',
            'Origin': 'http://www.bfmtv.com'}
 keyurl = 'http://players.brightcove.net/%s/%s_default/index.min.js'%(acc,pid)
 html = requests.get(keyurl,headers=headers).text
 pkey = re.findall('policyKey:"([^"]+)',html)[0]
 headers['Accept'] = 'application/json;pk=%s'%pkey
 url = 'https://edge.api.brightcove.com/playback/v1/accounts/%s/videos/%s'%(acc,vid)
 strurl = requests.get(url, headers=headers).json()['sources'][0]['src']
 return strurl
]]></expres>
<page>http://www.bfmtv.com/mediaplayer/live-video/</page>
<referer>http://www.bfmtv.com/</referer>
</regex>
</item>
 

boul

Member
Nov 24, 2017
34
0
6
some can help me please, this regex stop to work.
Thank so much

<item>
<title>TVA Go</title>
<link>$doregex[get-finalM3U8]|Connection=keep-alive&User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36&X-Requested-With=ShockwaveFlash/24.0.0.221&Accept=*/*&Referer=http://videos.tva.ca/live/tva&Accept-Encoding=gzip, deflate, sdch&Accept-Language=fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4&Cookie=$get_cookies$</link>
<thumbnail></thumbnail>
<fanart></fanart>
<regex>
<name>get-token</name>
<expres>"format":"encoded","data":"(aHR0cDovL2NoYW luZV90dmFfdWxzLWxoLmFrYW1haWhkLm5ldC9pL3R2YWdvXzFA NDEwNTYzL21hc3Rlci5tM3U4.*?)"</expres>
<page>hxxp://player.ooyala.com/sas/player_api/v2/authorization/embed_code/p0YWcyOm59_NdSoMjSB9HrFiHgOu/FnZG5mNTE6O21appG1nGC9kZRA6rEomg?device=html5&[/url] domain=videos.tva.ca</page>
<referer>http://videos.tva.ca/live</referer>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36</agent>
</regex>
<regex>
<name>get-finalM3U8</name>
<expres>$pyFunction:base64.b64decode("$doregex[get-token]")</expres>
<page></page>
</regex>
</item>
 
Last edited by a moderator:

tnico

New member
May 29, 2015
20
0
1
I tried to write this regex, some one can help me please.

<item>
<Title>Regex-mytvonline</title>
<link>$doregex[get-url]|User-Agent=Mozilla/5.0 (Linux; Android 5.1.1; en-GB; SM-G920F Build/LMY47X.G920FXXS3COK5) MXPlayer/1.7.40</link>
<regex>
<name>get-url</name>
<expres> player.src.*src:(.*?)'</expres>
<page>hxxps://www.mytvonline.org/fr/TVA.html</page>
<referer>hxxps://www.mytvonline.org/index.html</referer>
</regex>
<item>
 
Status
Not open for further replies.