Help for Regex

Status
Not open for further replies.

altug

Member
Jul 7, 2016
67
2
8
Just add (?s) before "bg-wrapper" to this line

Code:
data +=re.findall('(?s)"bg-wrapper".+?href="/(.*?)".+?data.+?//(.*?)".alt="(.*?)\sB.+?id="([^"]+)',re.findall('class="kd-docs-thumbnails">(?s)(.*?)<li class="next',source)[0]);pn +=1
Thank you streamwatcher2013
 
Last edited:

Picapau

Member
Nov 15, 2018
69
9
8
They only post low resolution video, nothing I can do. Try this:

Code:
https://pastebin.com/raw/XmndwALP

hello, I changed the structure of this server and I can not find the way to undo it, before I had a fixed password but now they change it in each entry, I tried it this way but it does not work, the problem is that I request it twice and that's why It does not work for me, but I do not know how to solve it, could you help me? thanks for your help.

the server is vergol and the web where to get it is
hxxps://verliga1.net/ver-0-online-gratis-en-directo-por-internet/



Code:
 <item>
 <title>[COLOR lightskyblue]https://vergol.com/live/plus1.php[/COLOR]</title>
 <link>https:$doregex[canal]|User-Agent=iPad</link>
 <regex>
 <name>canal</name>
 <rawpost>password=$doregex[key]</rawpost>
 <connection>keep-alive</connection>
 <accept>*/*</accept>
 <X-Req>XMLHttpRequest</X-Req>
 <cookieJar></cookieJar>
 <expres>'(//.*m3u8.*?)'</expres>
 <page>https://vergol.com/live/plus1.php</page>
 <referer>https://verliga1.net/</referer>
 <agent>iPad</agent>
 </regex>
 <regex>
 <name>key</name>
 <expres>(?s)Para ver el canal.*?(\d\d\d\d)</expres>
 <page>https://vergol.com/live/plus1.php</page>
 <referer>https://verliga1.net/</referer>
 <agent>iPad</agent>
 </regex>
 </item>
 
Last edited by a moderator:

opg2014

New member
Jun 7, 2017
8
0
1
Not working for me...
Am I doing something wrong?
Picapau, can you make a look?
Thank you!

hello, I changed the structure of this server and I can not find the way to undo it, before I had a fixed password but now they change it in each entry, I tried it this way but it does not work, the problem is that I request it twice and that's why It does not work for me, but I do not know how to solve it, could you help me? thanks for your help.

the server is vergol and the web where to get it is
hxxps://verliga1.net/ver-0-online-gratis-en-directo-por-internet/



Code:
 <item>
 <title>[COLOR lightskyblue]https://vergol.com/live/plus1.php[/COLOR]</title>
 <link>https:$doregex[canal]|User-Agent=iPad</link>
 <regex>
 <name>canal</name>
 <rawpost>password=$doregex[key]</rawpost>
 <connection>keep-alive</connection>
 <accept>*/*</accept>
 <X-Req>XMLHttpRequest</X-Req>
 <cookieJar></cookieJar>
 <expres>'(//.*m3u8.*?)'</expres>
 <page>https://vergol.com/live/plus1.php</page>
 <referer>https://verliga1.net/</referer>
 <agent>iPad</agent>
 </regex>
 <regex>
 <name>key</name>
 <expres>(?s)Para ver el canal.*?(\d\d\d\d)</expres>
 <page>https://vergol.com/live/plus1.php</page>
 <referer>https://verliga1.net/</referer>
 <agent>iPad</agent>
 </regex>
 </item>
 
Last edited by a moderator:

opg2014

New member
Jun 7, 2017
8
0
1
Need help with yhis site.
Anybody has a working regex?

ht tp: //hls. giize. com /un?ch =sk1 (remove spaces)

Thank you Gurus!
 

streamwatcher2013

Well-known member
Oct 24, 2013
817
334
63
USA
hello, I changed the structure of this server and I can not find the way to undo it, before I had a fixed password but now they change it in each entry, I tried it this way but it does not work, the problem is that I request it twice and that's why It does not work for me, but I do not know how to solve it, could you help me? thanks for your help.

the server is vergol and the web where to get it is
hxxps://verliga1.net/ver-0-online-gratis-en-directo-por-internet/



Code:
 <item>
 <title>[COLOR lightskyblue]https://vergol.com/live/plus1.php[/COLOR]</title>
 <link>https://www.tvaddons.co/forums/https:$doregex[canal]|User-Agent=iPad</link>
 <regex>
 <name>canal</name>
 <rawpost>password=$doregex[key]</rawpost>
 <connection>keep-alive</connection>
 <accept>*/*</accept>
 <X-Req>XMLHttpRequest</X-Req>
 <cookieJar></cookieJar>
 <expres>'(//.*m3u8.*?)'</expres>
 <page>https://vergol.com/live/plus1.php</page>
 <referer>https://verliga1.net/</referer>
 <agent>iPad</agent>
 </regex>
 <regex>
 <name>key</name>
 <expres>(?s)Para ver el canal.*?(\d\d\d\d)</expres>
 <page>https://vergol.com/live/plus1.php</page>
 <referer>https://verliga1.net/</referer>
 <agent>iPad</agent>
 </regex>
 </item>

Try this

Code:
https://pastebin.com/raw/DypdShaU
 
Last edited by a moderator:

mant

New member
Oct 29, 2018
8
0
1
Regex

Hi Master,

Please regex this site.

Code:
hxxps://www.xtra.com.my/ms/livetv
Thank you.
 

Rockey

Member
Sep 11, 2018
68
0
6
Here is the regex, the final resolution I did modifying slightly a regex of the teacher, so all the credits for streamwatcher2013. The agenda has not been updated.


Code:
<item>
<title>[COLOR lightskyblue]http://kora-live.tv/index-1.html[/COLOR]</title>
<link>https://www.tvaddons.co/forums/$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><=!=[=C=D=A=T=A=[
<title>[COLOR lightskyblue][[makelist.param3]]  [COLOR white][makelist.param4][/COLOR][makelist.param6] </title>
<link>https://www.tvaddons.co/forums/$doregex[getUrl]</link>
<thumbnail>http://kora-live.tv/[makelist.param3]</thumbnail>
<fanart>http://kora-live.tv/[makelist.param2]</fanart>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[(?s)<img class="chimg".*?src="(.*?)".*?<img class="chimg".*?src="(.*?)".*?class="matchtime">(.*?)<.*?size="2">(.*?)<|<a rel="nofollow" href="(.*?)".*?>(.*?)<]=]=></expres>
<page>http://kora-live.tv/matchtoday.php</page>
</regex>
<regex>
<name>cristal</name>
<expres><=!=[=C=D=A=T=A=[(?s)<iframe src='(.*)']=]=></expres>
<page>[makelist.param5]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re,requests
from urlresolver.plugins.lib import jsunpack
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013 
  source=jsunpack.unpack(re.findall('(eval.*m3u8.*)',requests.get(re.findall('src="(.+?net/embed[^"]+)',page_data)[0],headers={'user-agent':'Mozilla/5.0','referer':'http://kora-live.tv/$doregex[cristal]'}).content.decode('ascii','ignore'))[0]).replace('\\', '')
  return re.findall('Clappr.Player[\w\W]*?source.+?[\'"]([^\'"]+)',source)[0]+'|user-agent=ipad&referer='+re.findall('src="(.+?embed[^"]+)',page_data)[0]
]=]=></expres>
<page>http://kora-live.tv/$doregex[cristal]</page>
<referer>http://kora-live.tv/matchtoday.php</referer>
</regex>
</item>
I just found out that this code is stuck on 02-Dec-2018, the matchday schedule does not refresh itself. The matter is that the code is made for the old website.
Code:
http://kora-live.tv/index-1.html
Also the Low,SD,HD are all the same quality 480p

By the way The new website is this one:
Code:
http://kora-live.tv/
any solutions?
 

altug

Member
Jul 7, 2016
67
2
8
It doesn't work anymore. Anyone able to help?
Thanks!

Code:
<item>
<title>[COLOR gold]Çarpışma Bölümler[/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR yellow][makelist.param3][/COLOR]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#MrKrasniqi
  return re.findall('(?s)href="/(.*?)".*?src="(.*?)".*?title">([^<]+)',re.findall('class="swiper-wrapper">(?s)(.*?)"section-series-program-info',page_data)[0])
]]></expres>
<page>https://www.showtv.com.tr/dizi/tum_bolumler/carpisma-sezon-1-bolum-4-izle/68902</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param3] ([makelist2.param1]. Part)[/COLOR]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#MrKrasniqi
 if '"video-part"' in page_data:
   list=re.findall('video-part-name">(?s)(.*?)</ul',page_data)[0]
   title=re.findall('href.+?>(\d+)<',list);link=re.findall('href="/([^"]+)',list)
   return zip(title,link)
 elif '"video-part"' not in page_data:
   list=re.findall('"TVEpisode"(?s)(.*?)</script',page_data)[0].replace('\\','')
   return re.findall('"episodeNumber":"([^"]+)".+?url".+?.tr/([^"]+)',list)
]]></expres>
<page>https://www.showtv.com.tr/[makelist.param1]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#MrKrasniqi
  list=re.findall('"ht_files"(?s)(.*?)<script',page_data)[0].replace('\\','')
  if '1080' in list:
    return re.findall('"name":"1080"."file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  elif '720' in list:
    return re.findall('"name":"720"."file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  elif 'ht_mobile' in list:
    return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  else:
    return re.findall('"Standart","file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
]]></expres>
<page>https://www.showtv.com.tr/[makelist2.param2]</page>
<agent>Mozilla/5.0</agent>
<cookieJar></cookieJar>
</regex>
<thumbnail>https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Logo_of_Show_TV.png/150px-Logo_of_Show_TV.png</thumbnail>
</item>
 

opg2014

New member
Jun 7, 2017
8
0
1
Working perfect!
Thanks to streamwatcher2013 and picapau!

Can you help me with another one?

hxxp://hls. gi ize.c om/u n?ch=w wetv
need a referer: hxxp:// phot ocall .tv
(remove spaces)

I tried to regex, but I cant extract the final link...

Thank you again.
 
Last edited:

BymemoLee

Member
Apr 30, 2018
86
13
8
It doesn't work anymore. Anyone able to help?
Thanks!

Code:
<item>
<title>[COLOR gold]Çarpışma Bölümler[/COLOR]</title>
<link>https://www.tvaddons.co/forums/$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[COLOR yellow][makelist.param3][/COLOR]</title>
  <link>https://www.tvaddons.co/forums/$doregex[makelist2]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#MrKrasniqi
  return re.findall('(?s)href="/(.*?)".*?src="(.*?)".*?title">([^<]+)',re.findall('class="swiper-wrapper">(?s)(.*?)"section-series-program-info',page_data)[0])
]=]=></expres>
<page>https://www.showtv.com.tr/dizi/tum_bolumler/carpisma-sezon-1-bolum-4-izle/68902</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[COLOR gold][makelist.param3] ([makelist2.param1]. Part)[/COLOR]</title>
  <link>https://www.tvaddons.co/forums/$doregex[getUrl]</link>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#MrKrasniqi
 if '"video-part"' in page_data:
   list=re.findall('video-part-name">(?s)(.*?)</ul',page_data)[0]
   title=re.findall('href.+?>(\d+)<',list);link=re.findall('href="/([^"]+)',list)
   return zip(title,link)
 elif '"video-part"' not in page_data:
   list=re.findall('"TVEpisode"(?s)(.*?)</script',page_data)[0].replace('\\','')
   return re.findall('"episodeNumber":"([^"]+)".+?url".+?.tr/([^"]+)',list)
]=]=></expres>
<page>https://www.showtv.com.tr/[makelist.param1]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#MrKrasniqi
  list=re.findall('"ht_files"(?s)(.*?)<script',page_data)[0].replace('\\','')
  if '1080' in list:
    return re.findall('"name":"1080"."file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  elif '720' in list:
    return re.findall('"name":"720"."file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  elif 'ht_mobile' in list:
    return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  else:
    return re.findall('"Standart","file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
]=]=></expres>
<page>https://www.showtv.com.tr/[makelist2.param2]</page>
<agent>Mozilla/5.0</agent>
<cookieJar></cookieJar>
</regex>
<thumbnail>https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Logo_of_Show_TV.png/150px-Logo_of_Show_TV.png</thumbnail>
</item>
Code:
<item>
<title>[COLOR gold]Çarpışma Bölümler[/COLOR]</title>
<link>$doregex[encodeURL]</link>
<regex>
<name>encodeURL</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][encodeURL.param2][/COLOR]</title>
  <link>$doregex[makelist2]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('(?s).*?data-href="/([^<]+)".>([^<]+)</a>',re.findall('class="dropdown-content dropdown-scroll">(?s)(.*?)</div',page_data)[0])
]]></expres>
<page>https://www.showtv.com.tr/dizi/tanitim/carpisma/2374</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][encodeURL.param2] ([makelist2.param1]. Part)[/COLOR]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 if '"video-part"' in page_data:
   list=re.findall('video-part-name">(?s)(.*?)</ul',page_data)[0]
   title=re.findall('href.+?>(\d+)<',list);link=re.findall('href="/([^"]+)',list)
   return zip(title,link)
 elif '"video-part"' not in page_data:
   list=re.findall('"TVEpisode"(?s)(.*?)</script',page_data)[0].replace('\\','')
   return re.findall('"episodeNumber":"([^"]+)".+?url".+?.tr/([^"]+)',list)
]]></expres>
<page>https://www.showtv.com.tr/[encodeURL.param1]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('"ht_files"(?s)(.*?)<script',page_data)[0].replace('\\','')
  if '1080' in list:
    return re.findall('"name":"1080"."file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  elif '720' in list:
    return re.findall('"name":"720"."file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  elif 'ht_mobile' in list:
    return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  else:
    return re.findall('"Standart","file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
]]></expres>
<page>https://www.showtv.com.tr/[makelist2.param2]</page>
<agent>Mozilla/5.0</agent>
<cookieJar></cookieJar>
</regex>
<thumbnail>https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Logo_of_Show_TV.png/150px-Logo_of_Show_TV.png</thumbnail>
</item>
 

altug

Member
Jul 7, 2016
67
2
8
Code:
<item>
<title>[COLOR gold]Çarpışma Bölümler[/COLOR]</title>
<link>https://www.tvaddons.co/forums/$doregex[encodeURL]</link>
<regex>
<name>encodeURL</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[COLOR gold][encodeURL.param2][/COLOR]</title>
  <link>https://www.tvaddons.co/forums/$doregex[makelist2]</link>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('(?s).*?data-href="/([^<]+)".>([^<]+)</a>',re.findall('class="dropdown-content dropdown-scroll">(?s)(.*?)</div',page_data)[0])
]=]=></expres>
<page>https://www.showtv.com.tr/dizi/tanitim/carpisma/2374</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[COLOR gold][encodeURL.param2] ([makelist2.param1]. Part)[/COLOR]</title>
  <link>https://www.tvaddons.co/forums/$doregex[getUrl]</link>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 if '"video-part"' in page_data:
   list=re.findall('video-part-name">(?s)(.*?)</ul',page_data)[0]
   title=re.findall('href.+?>(\d+)<',list);link=re.findall('href="/([^"]+)',list)
   return zip(title,link)
 elif '"video-part"' not in page_data:
   list=re.findall('"TVEpisode"(?s)(.*?)</script',page_data)[0].replace('\\','')
   return re.findall('"episodeNumber":"([^"]+)".+?url".+?.tr/([^"]+)',list)
]=]=></expres>
<page>https://www.showtv.com.tr/[encodeURL.param1]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('"ht_files"(?s)(.*?)<script',page_data)[0].replace('\\','')
  if '1080' in list:
    return re.findall('"name":"1080"."file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  elif '720' in list:
    return re.findall('"name":"720"."file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  elif 'ht_mobile' in list:
    return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  else:
    return re.findall('"Standart","file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
]=]=></expres>
<page>https://www.showtv.com.tr/[makelist2.param2]</page>
<agent>Mozilla/5.0</agent>
<cookieJar></cookieJar>
</regex>
<thumbnail>https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Logo_of_Show_TV.png/150px-Logo_of_Show_TV.png</thumbnail>
</item>
Thank you @Bymemolee
sadly it doesnt work with my kodi 18,what can i do to fix that
 

vbprofi

Member
Feb 9, 2016
74
3
8
Thank you @Bymemolee
sadly it doesnt work with my kodi 18,what can i do to fix that
I have fixed the code. try this. I tested with Kodi 18 on Windows 10.
Code:
<item>
<title>[COLOR gold]Çarpışma Bölümler[/COLOR]</title>
<link>$doregex[encodeURL]</link>

<regex>
<name>encodeURL</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][encodeURL.param2][/COLOR]</title>
  <link>$doregex[makelist2]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('(?s).*?data-href="/([^<]+)".>([^<]+)</a>', re.findall('class="dropdown-content dropdown-scroll">(?s)(.*?)</div',page_data)[0])
]]></expres>
<page>https://www.showtv.com.tr/dizi/tanitim/carpisma/2374</page>
</regex>

<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][encodeURL.param2] ([makelist2.param1]. Part)[/COLOR]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 if '"video-part"' in page_data:
   list=re.findall('video-part-name">(?s)(.*?)</ul',page_data)[0]
   title=re.findall('href.+?>(\d+)<',list);link=re.findall('href="/([^"]+)',list)
   return zip(title,link)
 elif '"video-part"' not in page_data:
   list=re.findall('"TVEpisode"(?s)(.*?)</script',page_data)[0].replace('\\','')
   return re.findall('"episodeNumber":"([^"]+)".+?url".+?.tr/([^"]+)',list)
]]></expres>
<page>https://www.showtv.com.tr/[encodeURL.param1]</page>
</regex>

<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('"ht_files"(?s)(.*?)<script', page_data)[0].replace('\\', '')
  if '1080' in list:
    return re.findall('"name":"1080"."file":"([^"]+)', list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
  elif '720' in list:
    return re.findall('"name":"720"."file":"([^"]+)',list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
  elif 'ht_mobile' in list:
    return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
  else:
    return re.findall('"Standart","file":"([^"]+)',list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
]]></expres>
<page>https://www.showtv.com.tr/[makelist2.param2]</page>
<agent>Mozilla/5.0</agent>
<cookieJar></cookieJar>
</regex>
<thumbnail>https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Logo_of_Show_TV.png/150px-Logo_of_Show_TV.png</thumbnail>
</item>
on the last regex part you have change "iPadReferer" to "iPad&Referer", if "&" not exist.
 
Last edited:

opg2014

New member
Jun 7, 2017
8
0
1
Need help to regex this channel:

ht tp://hl s.g iize.c om/un? ch=ww etv
refe rer ht tp:// phot ocall. tv
(remove spaces)

Anyone can help me?
Thanks in advance.
 

Million

New member
Dec 9, 2018
24
1
3
Help for regex

Can you help me to make 2 regex for live channels and live events.
Code:
http://cricsports.sc
 

altug

Member
Jul 7, 2016
67
2
8
I have fixed the code. try this. I tested with Kodi 18 on Windows 10.
Code:
<item>
<title>[COLOR gold]Çarpışma Bölümler[/COLOR]</title>
<link>https://www.tvaddons.co/forums/$doregex[encodeURL]</link>

<regex>
<name>encodeURL</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[COLOR gold][encodeURL.param2][/COLOR]</title>
  <link>https://www.tvaddons.co/forums/$doregex[makelist2]</link>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('(?s).*?data-href="/([^<]+)".>([^<]+)</a>', re.findall('class="dropdown-content dropdown-scroll">(?s)(.*?)</div',page_data)[0])
]=]=></expres>
<page>https://www.showtv.com.tr/dizi/tanitim/carpisma/2374</page>
</regex>

<regex>
<name>makelist2</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[COLOR gold][encodeURL.param2] ([makelist2.param1]. Part)[/COLOR]</title>
  <link>https://www.tvaddons.co/forums/$doregex[getUrl]</link>
]=]=></listrepeat>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
 if '"video-part"' in page_data:
   list=re.findall('video-part-name">(?s)(.*?)</ul',page_data)[0]
   title=re.findall('href.+?>(\d+)<',list);link=re.findall('href="/([^"]+)',list)
   return zip(title,link)
 elif '"video-part"' not in page_data:
   list=re.findall('"TVEpisode"(?s)(.*?)</script',page_data)[0].replace('\\','')
   return re.findall('"episodeNumber":"([^"]+)".+?url".+?.tr/([^"]+)',list)
]=]=></expres>
<page>https://www.showtv.com.tr/[encodeURL.param1]</page>
</regex>

<regex>
<name>getUrl</name>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('"ht_files"(?s)(.*?)<script', page_data)[0].replace('\\', '')
  if '1080' in list:
    return re.findall('"name":"1080"."file":"([^"]+)', list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
  elif '720' in list:
    return re.findall('"name":"720"."file":"([^"]+)',list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
  elif 'ht_mobile' in list:
    return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
  else:
    return re.findall('"Standart","file":"([^"]+)',list)[0] + "|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]"
]=]=></expres>
<page>https://www.showtv.com.tr/[makelist2.param2]</page>
<agent>Mozilla/5.0</agent>
<cookieJar></cookieJar>
</regex>
<thumbnail>https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Logo_of_Show_TV.png/150px-Logo_of_Show_TV.png</thumbnail>
</item>
on the last regex part you have change "iPadReferer" to "iPad&Referer", if "&" not exist.
Thank you perfect @vbprofi
 

izac-rock

New member
May 2, 2018
32
0
0
hello guys
happy New Year for everyone
I would like a last regex of 2018 :)
xxx.barretos.eu/player/players.php?canal=tnt
please.
thank you and happy holidays
 

Picapau

Member
Nov 15, 2018
69
9
8
hello guys
happy New Year for everyone
I would like a last regex of 2018 :)
xxx.barretos.eu/player/players.php?canal=tnt
please.
thank you and happy holidays

try this

Code:
<item>
<title>[COLOR lightskyblue]http://www.barretos.eu/player/players.php?canal=tnt[/COLOR]</title>
<link>$doregex[cristal]|Referer=www.barretos.eu/player/players.php?canal=tnt&User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0</link>
<regex>
<name>cristal</name>
<expres>(?s)form>.*?href="(.*?)"</expres>
<page>http://www.barretos.eu/player/aovivo.php?canal=tnt</page>
</regex>
<thumbnail>https://uploaddeimagens.com.br/images/001/725/612/thumb/2.png</thumbnail>
</item>
 

Picapau

Member
Nov 15, 2018
69
9
8
Working perfect!
Thanks to streamwatcher2013 and picapau!

Can you help me with another one?

hxxp://hls. gi ize.c om/u n?ch=w wetv
need a referer: hxxp:// phot ocall .tv
(remove spaces)

I tried to regex, but I cant extract the final link...

Thank you again.
this works

Code:
<item>
<title>[COLOR lightskyblue]http://hls.giize.com/un?ch=wwetv[/COLOR]</title>
<link>$doregex[cristal]|Referer=http://hls.giize.com/un?ch=wwetv&User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0</link>
<regex>
<name>cristal</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
 source=requests.get('http://photocall.tv/', headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0','Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}).text;link=re.findall('(?s)title="Fight Time.*?a href="(.*?)"',source)[0]
 source=requests.get(link,headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0','Referer':'http://photocall.tv/','Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}).text;return re.findall("source: '(.*?)'",source)[0]
]]></expres>
<page></page>
</regex>
<thumbnail>http://photocall.tv/images/wwe.png</thumbnail>
</item>
 
Status
Not open for further replies.