Help for Regex

Status
Not open for further replies.

papaya

Member
Apr 4, 2018
41
1
8
Just use this one with minor modified

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
  url='https://www.youtube.com/watch?v='+re.findall('feature=c4-live-promo".*?watch\?v=(.*?)"',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>
Hi streamwatcher2013

it does work.. but keep buffering. it play smooth on the youtube. is it normal?
 

streamwatcher2013

Well-known member
Oct 24, 2013
811
332
63
USA
Help regex for this page h88p://allcalidad.com/tag/2018/
Try this. Change Count=2 to higher number to get more links

Code:
<item>
<title>http://allcalidad.com/tag/2018/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param3]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  count=2;pn=1;data=[]
  while pn <= int(count):
     page='http://allcalidad.com/tag/2018/page/'+str(pn)+'/';source=requests.get(page).content.decode('ascii','ignore')
     data +=re.findall('ah-imagge".href="(.*?)".*?src="(.*?)".*?title="(.*?)"',source);pn +=1
  return data
]]></expres>
<page></page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>$pyFunction:('[UPPERCASE][makelist2.param2][/UPPERCASE]')</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('"tab_box".*?(?:src|SRC)="(http(?:|s)://(?!hqq)([^w]+)\.(?:c|t).*?)"',page_data)
]]></expres>
<page>[makelist.param1]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,urlresolver
def GetLSProData(page_data,Cookie_Jar,m):
  return urlresolver.resolve('[makelist2.param1]')
]]></expres>
<page></page>
</regex>
</item>
 

espamer

New member
May 26, 2018
15
0
0
Tanks streamwatcher2013... only the servers appear, the links do not open
 
Last edited:

kabcasa

New member
Apr 28, 2015
21
0
1
At home
Can someone help me to resolve this link please
Code:
hxxps://www.myfree-tivi.com/watch/s
Thanks in advance
try this :
Code:
<item>
<title>www.myfree-tivi</title>
<thumbnail></thumbnail>
<link>plugin://plugin.video.f4mTester/?streamtype=HLSRETRY&url=$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
def GetLSProData(page_data,Cookie_Jar,m):
 import re , requests
 url = 'https://www.myfree-tivi.com/watch/s'
 page = requests.get(url)
 ck= re.findall('(?s)csrf-token".*?="(.*?)"',page.text)[0]#; print ck
 cj = page.cookies #; print cj
 ck = ck.replace('&','&')
 headers = {'Referer':url, 'User-Agent':'iPhone','X-CSRF-Token':ck,
            'X-Requested-With': 'XMLHttpRequest'}
 link = requests.post('https://www.myfree-tivi.com/getdata', headers = headers,cookies = cj)
 tok = re.findall('(?s)url":"(.*?)"',link.text)[0]
 m3u = tok.replace('\\','')
 return m3u
]]></expres>
<page></page>
</regex>
</item>
 

kabcasa

New member
Apr 28, 2015
21
0
1
At home
hi someone can help me please regex for thanks for everyone thanks
url ustream.tv/channel/EpqDGDmX8Cn


url.kurdmax.tv/live
url .kurdmaxshow.tv/live
try this
Code:
<item>
<Title>kurdmax.tv/live</title>
<link>$doregex[getMu8]</link>
<regex>
<name>getMu8</name>
<expres>sourceURL":"(.*?)"</expres>
<page>http://kurdmax.tv/live</page>
</regex>
</item>
Code:
<item>
<Title>kurdmaxshow.tv/live</title>
<link>$doregex[getMu8]</link>
<regex>
<name>getMu8</name>
<expres>sourceURL":"(.*?)"</expres>
<page>http://kurdmaxshow.tv/live</page>
</regex>
</item>
 
Last edited:

espamer

New member
May 26, 2018
15
0
0
Just found a new version released 5.0.16. Haven't tested it. Hope it helps.

Code:
https://github.com/tvaddonsco/script.module.urlresolver/tree/cc6d3658794a54c8b6d03f12508d9f4bd545b3dc
m5
I already tried it but it does not work, I do not know which version of LSP works well for it.
 

streamwatcher2013

Well-known member
Oct 24, 2013
811
332
63
USA
Can someone help me to resolve this link please
Code:
hxxps://www.myfree-tivi.com/watch/s
Thanks in advance
Here is the makelist for the site without member links

Code:
<item>
<title>https://www.myfree-tivi.com/livetv</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>https://[makelist.param3]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  count=re.findall('>(\d)<.*\n.*&ra',page_data)[0];pn=1;data=[]
  while pn <= int(count):
     page='https://www.myfree-tivi.com/livetv?page='+str(pn);source=requests.get(page).content.decode('ascii','ignore');list=re.findall('class="content-col-list">(?s)(.*?)"pagination',source)[0].replace(''','\'')
     data +=re.findall('"list-item-img".*\n.*href="/(.*?)".title="(?!Chaine)(.*?)".*\n.*src="//(.*?)"',list);pn +=1
  return data
]]></expres>
<page>https://www.myfree-tivi.com/livetv</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):# streamwatcher2013
  r=requests.get('https://www.myfree-tivi.com/[makelist.param1]',headers={'User-Agent':'Mozilla/5.0'},cookies=Cookie_Jar)
  source=requests.post('https://www.myfree-tivi.com/getdata',headers={'Referer':'https://www.myfree-tivi.com/[makelist.param1]','User-Agent':'Mozilla/5.0','X-CSRF-Token':re.findall('"csrf-token".content="(.*?)"',r.text)[0],'X-Requested-With':'XMLHttpRequest'},cookies=r.cookies).text
  return re.findall('url..[\'"](ht.*?wmsAuthSign.*?)[\'"]',source)[0].replace('\\','')+'|Referer=https://www.myfree-tivi.com/[makelist.param1]&User-Agent=Mozilla/5.0'
]]></expres>
<page></page>
</regex>
<thumbnail>https://www.myfree-tivi.com/imgs//android-icon-192x192.png</thumbnail>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
811
332
63
USA
hi someone can help me please regex for thanks for everyone thanks

hxxp://www.giniko.com/watch.php?id=327
It is in the source

Code:
_fp_("player",false, {title:"Al Quran Al Kareem - LIVE",[B][COLOR="#FF0000"]source:"http://nimlive6.giniko.com/saudiquran/saudiquran/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9NS8yOC8yMDE4IDc6MzU6NTcgUE0maGFzaF92YWx1ZT1Xd245cjhHMXFNZSsrMXJ1WEtHY2tRPT0mdmFsaWRtaW51dGVzPTE0NDA=[/COLOR][/B]"});
 

HAJAR

Banned
May 27, 2018
19
0
0
middelburg
I do not know it before but now no longer anyone can help me please


<streaminginfo>
<cname>Quran</cname>
<item>
<title>[COLOR green]Makkah[COLOR red][HD][/COLOR]</title>
<link>$doregex</link> <regex> <name>url</name> <expres>file: "([^"]*)</expres> <page>hxxp://www.giniko.com/watch.php?id=327</page> </regex> <thumbnail>hxxps://1.bp.blogspot.com/-G8AiREdNvYI/V4JSsE4HoZI/AAAAAAAAEBc/nN0nIrUiovcKjftgJqxvXgh3QM0P57kwgCLcB/w1200-h630-p-k-no-nu/al_quran_al_kareem_tv.png</thumbnail> </item> </streaminginfo> <streaminginfo> <cname>arabic</cname> <item> <title>[COLOR green]Al.sunnah[COLOR red][HD][/COLOR]</title> <link>$doregex[url]</link> <regex> <name>url</name> <expres>file: "([^"]*)</expres> <page>hxxp://www.giniko.com/watch.php?id=326</page> </regex> <thumbnail>hxxp://www.qassimy.com/channel-tv-live/files/image/saudi_sunnah_islamic_channel_live_online_free_arabic_channel.png</thumbnail> </item> </streaminginfo>
 
Last edited:

HAJAR

Banned
May 27, 2018
19
0
0
middelburg
what you are going to change for me every minute

thanks for you help me

_fp_("player",false, {title:"Al Quran Al Kareem - LIVE",source:"hxxp://nimlive6.giniko.com/saudiquran/saudiquran/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9NS8yOC8yMDE4IDc6MzU6NTcgUE0maGFzaF92YWx1ZT1Xd245cjhHMXFNZSsrMXJ1WEtHY2tRPT0mdmFsaWRtaW51dGVzPTE0NDA="}
 

streamwatcher2013

Well-known member
Oct 24, 2013
811
332
63
USA
what you are going to change for me every minute

thanks for you help me

_fp_("player",false, {title:"Al Quran Al Kareem - LIVE",source:"hxxp://nimlive6.giniko.com/saudiquran/saudiquran/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9NS8yOC8yMDE4IDc6MzU6NTcgUE0maGFzaF92YWx1ZT1Xd245cjhHMXFNZSsrMXJ1WEtHY2tRPT0mdmFsaWRtaW51dGVzPTE0NDA="}
Try this

Code:
<expres>"player".*? (?:file|source).*? [\'"]([^'"]+)</expres>
Or

Code:
<expres>(?:file|source).*? [\'"]([^'"]+)</expres>
 
Status
Not open for further replies.