Help for Regex

Status
Not open for further replies.

vbprofi

Member
Feb 9, 2016
72
3
8
give no ideas? I need help for capturing captchas.
Hi,
please help to fix this code for captchas.

Code:
<item>
<title>bs.to | single server</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
   <title>[COLOR yellow][makelist.param1][/COLOR]</title>
   <link>$doregex[selectserie]</link>
   <thumbnail>https://bs.to/public/img/header.png</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import requests,re,urllib
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def GetLSProData(page_data, Cookie_Jar, m):
  source = re.findall('id="seriesContainer">(?s)(.*?)<script',page_data)[0]
  return re.findall('strong>(.*?)</strong>(?s)(.*?)</ul',source)
]]></expres>
<page>https://bs.to/serie-alphabet</page>
<agent>Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.70 Mobile/13C71 Safari/601.1.46</agent>
<cookieJar></cookieJar>
<Accept>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</Accept>
<Connection>keep-alive</Connection>
</regex>
<regex>
<name>selectserie</name>
<listrepeat><![CDATA[
   <title>[COLOR yellow][selectserie.param2][/COLOR]</title>
   <link>$doregex[selectseason]</link>
   <thumbnail>https://bs.to/public/img/header.png</thumbnail>
]]></listrepeat>
<expres>href="(.*?)".title="(.*?)"</expres>
<page>[makelist.param2]</page>
</regex>

<regex>
<name>getcover</name>
<expres>src="(.*/cover.*?)"</expres>
<page>https://bs.to/[selectserie.param1]</page>
<referer>https://bs.to/serie-alphabet</referer>
<agent>Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.70 Mobile/13C71 Safari/601.1.46</agent>
<cookieJar></cookieJar>
</regex>

<regex>
<name>selectseason</name>
<listrepeat><![CDATA[
   <title>[COLOR yellow][selectserie.param2][/COLOR] - [COLOR dodgerblue]Staffel [selectseason.param2][/COLOR]</title>
   <link>$doregex[selectsession]</link>
   <thumbnail>https://bs.to$doregex[getcover]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import requests,re,urllib
def GetLSProData(page_data, Cookie_Jar, m):
  source = re.findall('id="seasons">(?s)(.*?)</ul',page_data)[0]
  return re.findall('href="(.*?\/(\d+))"',source)
]]></expres>
<page>https://bs.to/[selectserie.param1]</page>
<referer>https://bs.to/serie-alphabet</referer>
<agent>Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.70 Mobile/13C71 Safari/601.1.46</agent>
<cookieJar></cookieJar>
</regex>

<regex>
<name>selectsession</name>
<listrepeat><![CDATA[
   <title>[COLOR yellow][selectsession.param1][/COLOR] - [COLOR dodgerblue]Folge [selectsession.param2][/COLOR]</title>
   <link>$doregex[playvideo]</link>
   <thumbnail>https://bs.to$doregex[getcover]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import requests,re,urllib
def GetLSProData(page_data, Cookie_Jar, m):
  source = re.findall('class="episodes">(?s)(.*?)</table',page_data)[0]
  return re.findall('title="(.*?)">(\d+)<[\w\W\s]*?href="(.*?)">(?:Vivo)<',source)    # change FlashX to whatever server you want youwatch, openload, vivo,....
]]></expres>
<page>https://bs.to/[selectseason.param1]</page>
<referer>https://bs.to/serie-alphabet</referer>
<agent>Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.70 Mobile/13C71 Safari/601.1.46</agent>
<cookieJar></cookieJar>
<Accept>*/*</Accept>
</regex>

<regex>
<name>getUrl</name>
<expres>href="(.*?)".*?class="hoster-player"</expres>
<page>https://bs.to/[selectsession.param3]</page>
<cookieJar></cookieJar>
<agent>Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0</agent>
<Accept>*/*</Accept>
<referer>https://bs.to/serie-alphabet</referer>
<!-- <noredirect>true</noredirect> -->
<includeheaders/>
</regex>

 <regex>
 <name>playvideo</name>
<expres><![CDATA[#$pyFunction
import urlresolver
def GetLSProData(page_data,Cookie_Jar,m):
	url = '$doregex[getUrl]'
	streamLink = urlresolver.resolve(url)
	return streamLink
]]></expres>
 <page></page>
<cookieJar></cookieJar>
<agent>Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0</agent>
<Referer></Referer>
<Accept>*/*</Accept>
</regex>

</item>
 

HAJAR

Banned
May 27, 2018
19
0
0
middelburg
someone can help me make regex for me thanks for everyone that is really needed that live tv thanks


I have it stop every 10 or 20 seconds

Code:
http://www.ustream.tv/channel/EpqDGDmX8Cn

<item>
<title>[COLOR white]NEWART[/COLOR]</title>
<link>$doregex[get-url]|User-Agent=iPad</link>
<regex>
<name>get-url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
import requests
import re
import urllib2
ur='http://www.ustream.tv/channel/EpqDGDmX8Cn'
source3 = requests.get(ur)
cid = re.findall('channelId=(.*?);ustream', source3.text)[0]
url ='http://r45917422-1-'+cid+'-channel-live.ums.ustream.tv/1/ustream?type=viewer&appId=11&appVersion=2&media='+cid+'&application=channel'
source = requests.get(url)
keyid = re.findall('host":"(.*?)","connectionId":"(.*?)"', source.text)[0]
url1='http://'+keyid[0]+'/1/ustream?connectionId='+keyid[1]
source1 = requests.get(url1)
id = re.findall('uhls","url":"(.*?)"', source1.text)[0]
source2 = requests.get(id)
id1 = re.findall('7.*?\n(.*?)\/\n', source2.text)[0]
return id1
]]></expres>
<page></page>
<cookieJar></cookieJar>
</regex>
<cookieJar></cookieJar>
</item>
 
Last edited by a moderator:

afzal

New member
Jul 19, 2014
24
1
3
@Hajar, why can't you just follow the instruction to put the link under code tab.

No one will help you with that if you don't follow the forum rules
 

streamwatcher2013

Well-known member
Oct 24, 2013
786
318
63
USA
hi master,

anyone can help me with this link

Code:
https://goo.gl/mTiiM6
Try this:

Code:
<item>
<title>https://myklik.rtm.gov.my/catchup/telemovies</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2] ([makelist.param4])</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('data-src="(.*?).alt="(.*?)"[\w\W]*?lines-2"><a.href="/(.*?)"[\w\W]*?"meta">.*\n.*?(\w.*?)\n',re.findall('</h1>(?s)(.*?)</section',page_data)[0])
]]></expres>
<page>https://myklik.rtm.gov.my/catchup/telemovies</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,urllib
def GetLSProData(page_data,Cookie_Jar,m,url=re.findall('"videoplayer".*?"(h[^?]+)',requests.get('https://myklik.rtm.gov.my/[makelist.param3]').content.decode('ascii','ignore'))[0]):
  return re.findall('file="([^"]+)',requests.get(url,headers={'Referer':'https://myklik.rtm.gov.my/[makelist.param3]'}).text)[0]+'|User-Agent=VLC&Referer=https://myklik.rtm.gov.my/[makelist.param3]'
]]></expres>
<page></page>
</regex>
</item>
 

cezi1

Member
Aug 1, 2017
30
0
6
@HAJAR

Watch the Video


Code:
https://screencast-o-matic.com/embed?sc=cFhvYFbM6A&v=5&ff=1
 

streamwatcher2013

Well-known member
Oct 24, 2013
786
318
63
USA
need your help. thank you
hxxp://playtv.fr/television/j4t/
Try this:

Code:
<item>
<title>http://playtv.fr/television/j4t/</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  url=re.findall('"play":"(.*?)"',page_data)[0].replace('\\','')+'?format=hls&language=fr'
  return requests.get(url,headers={'Referer':'http://playtv.fr/television/j4t/','X-Requested-With':'XMLHttpRequest'}).json()['url']+'|User-Agent=iPad&Referer=http://playtv.fr/television/j4t/'
]]></expres>
<page>http://playtv.fr/television/j4t/</page>
</regex>
</item>

<item>
<title>J4T</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,urllib
def GetLSProData(page_data,Cookie_Jar,m):
  url=re.findall('"play":"(.*?)"',page_data)[0].replace('\\','')+'?format=hls&language=fr'
  return 'plugin://plugin.video.f4mTester/?streamtype=HLSRETRY&name=J4T&url='+urllib.quote_plus(requests.get(url,headers={'Referer':'http://playtv.fr/television/j4t/','X-Requested-With':'XMLHttpRequest'}).json()['url'])+'|User-Agent=iPad&Referer=http://playtv.fr/television/j4t/'
]]></expres>
<page>http://playtv.fr/television/j4t/</page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
786
318
63
USA
Can you help me with a list of these channels in RGX hxxps://pastebin.com/raw/xxxx
Try this. Don't know how long it last. Simple regex anyway

Code:
<item>
<title>https://unblocked.lol/tv</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>https://unblocked.lol/unblocked/logo2.png</thumbnail>
]]></listrepeat>
<expres><![CDATA["col-sm-3.*?href=(.*?).tar.*?>(.*?)<]]></expres>
<page>https://unblocked.lol/tv</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return 'https://'+re.findall('<video[\w\W]*?src="//(.*?)"',page_data)[0]+'|User-Agent=iPad'
]]></expres>
<page>[makelist.param1]</page>
</regex>
<thumbnail>https://unblocked.lol/unblocked/logo2.png</thumbnail>
</item>


<item>
<title>https://unblocked.lol/tv</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param2]</title>
  <link>https://$doregex[getUrl]|User-Agent=iPad</link>
  <thumbnail>https://unblocked.lol/unblocked/logo2.png</thumbnail>
]]></listrepeat>
<expres><![CDATA["col-sm-3.*?href=(.*?).tar.*?>(.*?)<]]></expres>
<page>https://unblocked.lol/tv</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[<video[\w\W]*?src="//([^"]+)]]></expres>
<page>[makelist.param1]</page>
</regex>
<thumbnail>https://unblocked.lol/unblocked/logo2.png</thumbnail>
</item>
 

tobotminer

Member
Jan 26, 2018
49
4
8
hi all,

anyone know why suddenly streamango does not work in lsp? im using this code, i already update latest lsp 2.8.4

Code:
<item>
<title>Better</title>
<thumbnail></thumbnail>
<urlsolve>https://streamango.com/embed/bspkfntlfpcklfos/</urlsolve>
</item>

<item>
<title>Better direct</title>
<thumbnail></thumbnail>
<link>https://streamango.com/embed/bspkfntlfpcklfos/</link>
</item>
 

gujal

Developer
Dec 26, 2013
426
212
43
@tobotminer
LSP 2.8.2 and above needs ResolveURL installed for the <urlsolve> tag to work
LSP 2.8.1 and below use URLResolver to play <urlsolve> tag

The streamango plugin is broken in those, LSP can't do anything about it
 
Last edited:

streamwatcher2013

Well-known member
Oct 24, 2013
786
318
63
USA
hi all,

anyone know why suddenly streamango does not work in lsp? im using this code, i already update latest lsp 2.8.4

Code:
<item>
<title>Better</title>
<thumbnail></thumbnail>
<urlsolve>https://streamango.com/embed/bspkfntlfpcklfos/</urlsolve>
</item>

<item>
<title>Better direct</title>
<thumbnail></thumbnail>
<link>https://streamango.com/embed/bspkfntlfpcklfos/</link>
</item>
I will try to work on urlresolver for streamango tomorrow. A new stuff to play with :)
 

tobotminer

Member
Jan 26, 2018
49
4
8
@tobotminer
LSP 2.8.2 and above needs ResolveURL installed for the <urlsolve> tag to work
LSP 2.8.1 and below use URLResolver to play <urlsolve> tag

The streamango plugin is broken in those, LSP can't do anything about it
Ok, so that mean the code in resolveurl need to be fix yeah?. Thanks make sense now

I will try to work on urlresolver for streamango tomorrow. A new stuff to play with :)
Thank you, hope it work ;)
 
Status
Not open for further replies.