Help for Regex

Status
Not open for further replies.

fantomas777

New member
Aug 28, 2016
10
0
1
Code:
now its working perfect
i have change in this mode
<link>[makelist.param2]|User-Agent=MxPlayer/1.7[makelist.param3]&Buffer=20971520 live=1 timeout=15</link>
:)
 

fantomas777

New member
Aug 28, 2016
10
0
1
Enjoy!

Code:
<item>
<title>[COLOR cyan]SCTV[/COLOR]</title>
<link>https://www.tvaddons.co/forums/$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests
  surl = re.findall('data-vjs-clip-hls-url="([^"]+)',page_data)[0]
  ua = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1'}
  tokurl = 'https://www.vidio.com/csrf_tokens'
  strtok = 'https://www.vidio.com/live/204/tokens'
  r = requests.get(tokurl,headers=ua,cookies=Cookie_Jar)
  tok = r.json()['token']
  data = {'authenticity_token':(None, tok)}
  stoken = requests.post(strtok, headers=ua, cookies=r.cookies, files=data).json()['token']
  return surl + '?' + stoken 
]=]=></expres>
<page>https://www.vidio.com/live/204-sctv-tv-stream</page>
<cookiejar></cookiejar>
</regex>
</item>
Kodi 17.6 Windows | Android:)
 

espamer

New member
May 26, 2018
15
0
0
Try this. Change Count=2 to higher number to get more links

Code:
<item>
<title>http://allcalidad.com/tag/2018/</title>
<link>https://www.tvaddons.co/forums/$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[makelist.param3]</title>
  <link>https://www.tvaddons.co/forums/$doregex[makelist2]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[#$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><=!=[=C=D=A=T=A=[
  <title>$pyFunction:('[UPPERCASE][makelist2.param2][/UPPERCASE]')</title>
  <link>https://www.tvaddons.co/forums/$doregex[getUrl]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[#$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><=!=[=C=D=A=T=A=[#$pyFunction
import re,urlresolver
def GetLSProData(page_data,Cookie_Jar,m):
  return urlresolver.resolve('[makelist2.param1]')
]=]=></expres>
<page></page>
</regex>
</item>
This page I think it did an update and I can not see the links of the servers
 

Lacasitos74

Member
Nov 21, 2016
43
1
8
the site has changed ...:p (movies still working on it ? not for me)
And i do not have time for the moment sorry, maybe another day.
[HR][/HR]
EDIT:

enjoy:
(take the first link so legendado each time and hd link)
ALL MOVIES and realy fast
Code:
<item>
<title>[COLOR gold]http://netcine.us/?mt[/COLOR] ALL Filmes UPDATE</title>  
<link>https://www.tvaddons.co/forums/$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><=!=[=C=D=A=T=A=[
    <title>[makelist.param2]  [COLOR gold]*[makelist.param4]/10*[/COLOR]</title>
    <link>https://www.tvaddons.co/forums/$doregex[hd]</link>
    <thumbnail>[makelist.param1]</thumbnail>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
 count=re.findall('paginado\'.*(\d)',page_data)[0];pn=1;data=[]
 while pn <= int(count):
	page='http://netcine.us/page/'+str(pn)+'/?mt'
	source=requests.get(page).content.decode('ascii','ignore')
	list=re.findall('<div id="box_movies">(?s)(.*?)<div id="paginador">',source)[0]
	data +=re.findall('<img src="([^"]+)" alt="([^"]+).*\n.*\n*.*(http[^"]+).*\n.*\n.*grade"></span> (\d[^<]*)',list);pn +=1
 return data
]=]=></expres>
<page>http://netcine.us/?mt</page>
<agent>Mozilla/5.0</agent>
</regex>
 <regex>
<name>hd</name>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#Pustule
 url1 = re.findall('iframe src="([^"]+)',page_data)[0]
 r = requests.get(url1).content.decode('ascii','ignore') 
 url2= re.findall('src="([^"]+)',r)[0]
 r = requests.get(url2).content.decode('ascii','ignore')
 url3= re.findall('\n<a href ="(http[^"]+)',r)[0]
 r = requests.get(url3).content.decode('ascii','ignore')
 return re.findall('file: "([^"]+)',r)[-1]
]=]=></expres>
<page>[makelist.param3]</page>
<agent>Mozilla/5.0</agent>
</regex>
</item>
Hi..
i add regex clean for remove this '&#8211 , &#...' in the name of films.. try this code

Code:
<item>
<title>[COLOR gold]http://netcine.us/?mt[/COLOR][Com os nomes corregidos]</title>  
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
    <title>$doregex[clean]  [COLOR gold]*[makelist.param4]/10*[/COLOR]</title>
    <link>$doregex[hd]</link>
    <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
 count=re.findall('paginado\'.*(\d)',page_data)[0];pn=1;data=[]
 while pn <= int(count):
	page='http://netcine.us/page/'+str(pn)+'/?mt'
	source=requests.get(page).content.decode('ascii','ignore')
	list=re.findall('<div id="box_movies">(?s)(.*?)<div id="paginador">',source)[0]
	data +=re.findall('<img src="([^"]+)" alt="([^"]+).*\n.*\n*.*(http[^"]+).*\n.*\n.*grade"></span> (\d[^<]*)',list);pn +=1
 return data
]]></expres>
<page>http://netcine.us/?mt</page>
<agent>Mozilla/5.0</agent>
</regex>
<regex>
<name>clean</name>
<expres>$pyFunction: '[makelist.param2]'.replace("&","").replace("#038;","&").replace("#8211;","-").replace("#8217;","'").replace("#250;","ú").replace("#249;","ù").replace("#251;","û").replace("#252;","ü").replace("#220;","Ü").replace("#219;","Û").replace("#218;","Ú").replace("#217;","Ù").replace("#231;","ç").replace("#199;","Ç").replace("#227;","ã").replace("#195;","Ã").replace("#192;","À").replace("#193;","Á").replace("#194;","Â").replace("#196;","Ä").replace("#224;","à").replace("#225;","á").replace("#226;","â").replace("#228;","ä").replace("#200;","È").replace("#201;","É").replace("#202;","Ê").replace("#203;","Ë").replace("#232;","è").replace("#233;","é").replace("#234;","ê").replace("#235;","ë").replace("#236;","ì").replace("#237;","í").replace("#238;","î").replace("#239;","ï").replace("#204;","Ì").replace("#205;","Í").replace("#206;","Î").replace("#207;","Ï").replace("#210;","Ò").replace("#211;","Ó").replace("#212;","Ô").replace("#213;","Õ").replace("#214;","Ö").replace("#242;","ò").replace("#243;","ó").replace("#244;","ô").replace("#245;","õ").replace("#246;","ö").replace("#217;","Ù").replace("#218;","Ú").replace("#219;","Û").replace("#220;","Ü").replace("#249;","ù").replace("#250;","ú").replace("#251;","û").replace("#252;","ü").replace("#209;","Ñ").replace("#241;","ñ")</expres>
<page></page>
</regex>
 <regex>
<name>hd</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#Pustule
 url1 = re.findall('iframe src="([^"]+)',page_data)[0]
 r = requests.get(url1).content.decode('ascii','ignore') 
 url2= re.findall('src="([^"]+)',r)[0]
 r = requests.get(url2).content.decode('ascii','ignore')
 url3= re.findall('\n<a href ="(http[^"]+)',r)[0]
 r = requests.get(url3).content.decode('ascii','ignore')
 return re.findall('file: "([^"]+)',r)[-1]
]]></expres>
<page>[makelist.param3]</page>
<agent>Mozilla/5.0</agent>
</regex>
</item>
apreciate..
 

myosmc

Member
May 18, 2018
56
1
8
Is it possible to make or exist a code where there are links m3u8 links and take the one that is online at that moment? is for LSP 2.8.1.

Appreciate your help
 

Lacasitos74

Member
Nov 21, 2016
43
1
8
Hi good people..
Can you help me with this regex please.
Code:
<item>
<title>https://cinematuga.fun</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist1</name>
<listrepeat><![CDATA[
  <title>[makelist1.param2]</title>
  <link>$doregex[makelist]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[(?s)https\:\/\/cinematuga\.fun\/category\/(.*?)"\s+>(.*?)<\/a]]></expres>
<page>https://cinematuga.fun</page>
</regex>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param3]</title>
  <urlsolve>$doregex[getUrl]</urlsolve>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[(?s)\<div\s+class="item"><div\s+class="thumb"><a\s+href="(.*?)"><img\s+src="(.*?)".*?title="(.+?)".*?<\/div>]]></expres>
<page>https://cinematuga.fun/category/desporto/[makelist1.param1]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[300\s+src="(.*?)"]]></expres>
<page>[makelist.param1]</page>
</regex>
</item>
thanks a lot
 

cris_manya

Member
Nov 20, 2016
34
0
6
Hi guys
Can anyone help me with a regex
Code:
hxxp://futbollibre.online/fox-sports-2/embed4.html
Thanks in advance!
 

streamwatcher2013

Well-known member
Oct 24, 2013
897
383
63
USA
Hi good people..
Can you help me with this regex please.
Code:
<item>
<title>https://cinematuga.fun</title>
<link>https://www.tvaddons.co/forums/$doregex[makelist]</link>
<regex>
<name>makelist1</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[makelist1.param2]</title>
  <link>https://www.tvaddons.co/forums/$doregex[makelist]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[(?s)https\:\/\/cinematuga\.fun\/category\/(.*?)"\s+>(.*?)<\/a]=]=></expres>
<page>https://cinematuga.fun</page>
</regex>
<regex>
<name>makelist</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[makelist.param3]</title>
  <urlsolve>$doregex[getUrl]</urlsolve>
  <thumbnail>[makelist.param2]</thumbnail>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[(?s)\<div\s+class="item"><div\s+class="thumb"><a\s+href="(.*?)"><img\s+src="(.*?)".*?title="(.+?)".*?<\/div>]=]=></expres>
<page>https://cinematuga.fun/category/desporto/[makelist1.param1]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><=!=[=C=D=A=T=A=[300\s+src="(.*?)"]=]=></expres>
<page>[makelist.param1]</page>
</regex>
</item>
thanks a lot
It's full 9 yards

Code:
https://pastebin.com/raw/w55Xbb4e
 
Status
Not open for further replies.