Help for Regex

Status
Not open for further replies.

thingy

Member
May 9, 2018
58
0
6
I'm trying to mount this regex of Streamwatcher from another site to see if I made my hand
Code:
<item>
<title>inkapelis</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2][/COLOR]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('href="(.*?)">(.*?)<',re.findall('class="AZList">(?s)(.*?)</ul',page_data)[0])
]]></expres>
<page>https://www.inkapelis.net/</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist2.param3] ([makelist2.param4])[/COLOR] - [COLOR dodgerblue][makelist2.param5][/COLOR]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>http://[makelist2.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  if 'page-numbers' not in page_data:
    return re.findall('src="//(.*?)"[\w\W]*?href="(.*?)".*\n.*>(.*?)\s*\((\d+)[\w\W]*?lty">(.*?)<',page_data)
  elif 'page-numbers' in page_data:
    count=re.findall('page/(\d+)/.*\n.*?class="next',page_data)[0];pn=1;data=[]
    while pn <= int(count):
      page='[makelist.param1]page/'+str(pn)+'/';source=requests.get(page).content.decode('ascii','ignore')
      data +=re.findall('src="//(.*?)"[\w\W]*?href="(.*?)".*\n.*>(.*?)\s*\((\d+)[\w\W]*?lty">(.*?)<',source);pn +=1
    return data
]]></expres>
<page>[makelist.param1]</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,base64
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  url=re.findall('src="(.*?)"',base64.b64decode(re.findall('"VideoPlayer".*\n.*?>(.*?)<',page_data)[0]))[0];source=requests.get(url,headers={'Referer':'[makelist2.param2]'}).content.decode('ascii','ignore')
  if 'q=720p' in source:
     source=requests.get(url+'&q=720p',headers={'Referer':'[makelist2.param2]'}).content.decode('ascii','ignore');return re.findall('src="(h.*?)".type="video/mp4"',source)[0]+'|User-Agent=iPad&Referer='+url
  elif 'q=480p' in source:
     source=requests.get(url+'&q=480p',headers={'Referer':'[makelist2.param2]'}).content.decode('ascii','ignore');return re.findall('src="(h.*?)".type="video/mp4"',source)[0]+'|User-Agent=iPad&Referer='+url
]]></expres>
<page>[makelist2.param2]</page>
</regex>
<thumbnail></thumbnail>
</item>
 

gujal

Developer
Dec 26, 2013
476
245
43
In DeccanDelight the Channels are loaded from another link. The stream is buffering and not really useful. Online on abroad India the stream is playing fine. Can you please check and update?
Which channel is buffering for you?
The issue will most probably that the stream is a multibitrate stream. JWPlayer on the browser by default will pick the smallest bitrate stream. Kodi will pick the largest bitrate stream which could lead to buffering. I can confirm once you specify which particualr channels plays fine on the web and struggles in Kodi
 

turko03

Member
Mar 27, 2018
52
1
8
hi guys help me this code makelist please
hxxps://www.ecanlitvizle.live/tv.php

thanks in advance
 

MasterT3

New member
Dec 28, 2013
17
0
0
Which channel is buffering for you?
The issue will most probably that the stream is a multibitrate stream. JWPlayer on the browser by default will pick the smallest bitrate stream. Kodi will pick the largest bitrate stream which could lead to buffering. I can confirm once you specify which particualr channels plays fine on the web and struggles in Kodi
It also take very long time to start the stream. For example this channel on the browser is from another server and in kodi from another server. Yupp vs Airtel. In Kodi it is extremely buffering. Please check and inform me.

Code:
http://livetv.abroadindia.com/?channel=JAYA%20MOVIE
In Browser:
Code:
https://ind45-lh.akamaihd.net/i/[email protected]/master.m3u8?b=100-2500&dw=7200&hdnea=st=1534929988~exp=1534944388~acl=!*/i/[email protected]/*!/payload/yupptvnewservice_5_-1_na_IN_101.53.145.181/*~hmac=11e0d13868056fea8a373b9d71b0904111c62acd0a92122f4eb8feece03ca22d&partnerid=1000&partnername=YUPPINarray
In Kodi:
Code:
http://125.17.129.14/wh7f454c46tw4122932589_1581742526/PLTV/88888888/224/3221226095/04.m3u8
 

BymemoLee

Member
Apr 30, 2018
88
16
8
Hello
you do not work the makalist

Code:
<item>
<title>http://ticketbar.tv/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('channel-list">(?s)(.*?)</section',page_data)[0]
  return re.findall('"item.*\n.*href=[\'"]([^\'"]+)".title=[\'"]([^\'"]+)',list)
]]></expres>
<page>http://ticketbar.tv/</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  url=re.findall('iframe src.*?[\'"](.*?)[\'"]',page_data)[0]
  source=requests.get(url,headers={'User=Agent':'Mozilla/5.0','Referer':'[makelist.param1]'}).content
  return re.findall('[\'"](h.*?m3u8.*?)[\'"]',source)[0]+'|User-Agent=Mozilla/5.0&Referer='+url
]]></expres>
<page>[makelist.param1]</page>
<referer>http://ticketbar.tv/</referer>
<cookieJar></cookieJar>
</regex>
</item>
 

BymemoLee

Member
Apr 30, 2018
88
16
8
hi guys help me this code makelist please
hxxps://www.ecanlitvizle.live/tv.php

thanks in advance
Code:
<item>
<title>TGRT BELGESEL</title>
<link>$doregex[encodedURL]|User-Agent=iPad&Referer=https://www.ecanlitvizle.live/</link>
<regex>
<name>encodedURL</name>
<expres>[\'"](h.*?m3u8.*?)[\'"]</expres>
<page>https://www.ecanlitvizle.live/embed.php?kanal=tgrt-belgesel-tv-izle</page>
<referer>https://www.ecanlitvizle.live/</referer>
<cookieJar></cookieJar>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
849
352
63
USA
Hello
you do not work the makalist
Sorry m8. My bad. It should work now

Code:
<item>
<title>http://ticketbar.tv/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  list=re.findall('channel-list">(?s)(.*?)</section',page_data)[0]
  return re.findall('"item.*\n.*href=[\'"]([^\'"]+)".title=[\'"]([^\'"]+)',list)
]]></expres>
<page>http://ticketbar.tv/</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  url=re.findall('iframe src.*?[\'"](.*?)[\'"]',page_data)[0]
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'http://ticketbar.tv/[makelist.param1]'}).content
  return re.findall('[\'"](h.*?m3u8.*?)[\'"]',source)[0]+'|user-agent=Mozilla/5.0&referer='+url
]]></expres>
<page>http://ticketbar.tv/[makelist.param1]</page>
<referer>http://ticketbar.tv/</referer>
</regex>
</item>
 

tpoupi

New member
Jan 2, 2016
30
0
1
Hi guru, Can anybody help-me with the makelist. Thanks

<item>
<title>makelist hxxp://kineskop.tv/</title>
<thumbnail>hxxp://icons.iconarchive.com/icons/custom-icon-design/flag-3/256/Russia-Flag-icon.png</thumbnail>
<fanart>hxxp://mediasat.info/wp-content/uploads/2015/02/iptv_03.jpg</fanart>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR white][makelist.param1][/COLOR]</title>
<link>[makelist.param2]</link>
<thumbnail>hxxps://images5.alphacoders.com/563/thumb-350-563177.jpg</thumbnail>
<fanart>hxxp://mediasat.info/wp-content/uploads/2015/02/iptv_03.jpg</fanart>
]]></listrepeat>
<expres>#EXTINF:0.*,(.*?)\n(.*)</expres>
<page>hxxp://kineskop.tv/pl/</page>
<referer>hxxp://kineskop.tv/</referer>
<User-Agent>Android</User-Agent>
<agent>Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36</agent>
<connection>keep-alive</connection>
<accept>text/html, */*; q=0.01</accept>
<Accept-Encoding>gzip, deflate, sdch</Accept-Encoding>
<Accept-Language>en-US,en;q=0.8,th;q=0.6</Accept-Language>
<X-Requested>XMLhxxpRequest</X-Requested>
</regex>
<info></info>
</item>
 

fantomas777

New member
Aug 28, 2016
10
0
1
hello my friends

Help for Regex like this
Code:
</item>

<item>
<title>[COLOR lime]TV_STREET[/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR blue]test:[/COLOR] [COLOR yellow][makelist.param1][/COLOR]</title>
<link>[makelist.param2]&[makelist.param3]</link>
<referer></referer>
<thumbnail></thumbnail>
]]></listrepeat>
<expres>"channel_title":"(.*?)","channel_url":"(.*?)","channel_thumbnail":"(.*?)","channel_desc":"(.*?)","cid":"(.*?)","category_name":"(.*?)","category_image":"(.*?)"</expres>
<page>hxxp://www.tvshqip.xyz/apps/diolen/api.php?search</page>
<referer></referer>
<cookieJar></cookieJar>
<agent>Dalvik/2.1.0 (Linux; U; Android 5.0; App Runtime for Chrome Dev Build/48.5021.575.0)</agent>
</regex>
</item>
PM:
please and thanks
 

BymemoLee

Member
Apr 30, 2018
88
16
8
Sorry m8. My bad. It should work now

Code:
<item>
<title>http://ticketbar.tv/</title>
<link>https://www.tvaddons.co/forums/$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><=!=[=C=D=A=T=A=[
  <title>[makelist.param2]</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):
  list=re.findall('channel-list">(?s)(.*?)</section',page_data)[0]
  return re.findall('"item.*\n.*href=[\'"]([^\'"]+)".title=[\'"]([^\'"]+)',list)
]=]=></expres>
<page>http://ticketbar.tv/</page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>getUrl</name>
<expres><=!=[=C=D=A=T=A=[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  url=re.findall('iframe src.*?[\'"](.*?)[\'"]',page_data)[0]
  source=requests.get(url,headers={'user-agent':'Mozilla/5.0','referer':'http://ticketbar.tv/[makelist.param1]'}).content
  return re.findall('[\'"](h.*?m3u8.*?)[\'"]',source)[0]+'|user-agent=Mozilla/5.0&referer='+url
]=]=></expres>
<page>http://ticketbar.tv/[makelist.param1]</page>
<referer>http://ticketbar.tv/</referer>
</regex>
</item>
Thank you so much
 
Status
Not open for further replies.