TOOLSP
"
WELCOME !

Please ! Use [CODE] tags for your LINKS and CODE.
Favor usar balisas [CODE] para sus vínculos y código.
Merci d'utiliser les balises [CODE] pour vos liens et code.

[code]http://Thank.you[/code]
"
*** GITHUB ***
.
.
URL Resolver [GIT]
.
.
.
.
Jx Update [REDIRECT]
.
.
*** Associated ***
.
Pastebin Your list online
.
mediafire Upload Files
.
imgur Upload Pics
lyngsat TV logos collection
transparent .png
.
http://hola.org free? VPN
Hola.apk free? VPN App.
.
hidester- free Proxy
.
webgrabplus EPG - Eng
xmltv EPG - Fr
kazer EPG - Fr
.
.wordreference Traduction
.
mail.com (fast sign-in)
.
.
Latest topics
» SportsDevil back on Mega
Yesterday at 14:38 by skyhigh

» SportsDevil back on Mega
Fri 17 Nov - 5:30 by jairoxyz

» youtube playlists
Tue 14 Nov - 2:43 by jujuuj

» afromotion
Thu 9 Nov - 13:59 by doctor4979

» ? works on VLC, but not on kodi ?
Mon 6 Nov - 13:06 by jujuuj

» how make a request.post to get a repond
Tue 31 Oct - 16:01 by jujuuj

» how to play this in kodi
Tue 31 Oct - 15:21 by jujuuj

FRIENDS / PARTNERS

forum

créer un forum


help with regex

View previous topic View next topic Go down

help with regex

Post by suport on Sat 15 Jul - 17:57

hi to all members of the forum please can some one take a look a this regex and say waht need to be change

<item>
<title>Arconia TV </title>
<link>$doregex[makelist]</link>

<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param1]</title>
<link>$doregex[makelist2]</link>
<referer></referer>
<thumbnail>NA</thumbnail>
]]></listrepeat>
<expres> (.*?),</expres>
<page>$doregex[select]</page>
<cookieJar></cookieJar>
</regex>

<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
<title>[makelist2.param2]</title>
<link>$doregex[get-m3u8]|User-Agent=Mozilla/5.0 (X11; Linux i686; rv:42.0) Gecko/20100101 Firefox/42.0 Iceweasel/42.0</link>
<referer></referer>
<thumbnail></thumbnail>
]]></listrepeat>
<expres><![CDATA[<li id="menu-item.*?menu-item menu-item-type-post_type menu-item-object-page menu-item-[0-9].*?columns1">\n<a href="(.*?)".*?\n.*?\n.*?\n.*?\n(.*)]]></expres>
<page>$doregex[select-source]</page>
<cookieJar></cookieJar>
</regex>

<regex>
<name>select</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):

return '[0, Channels, Cable Tv, Movies, 4]'
]]></expres>
<page></page>
<referer></referer>
</regex>

<regex>
<name>select-source</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
import requests
import re

url = 'https://www.arconaitv.me/'
headers = {'User-Agent': 'Mozilla/5.0 (X11; Linux i686; rv:42.0) Gecko/20100101 Firefox/42.0 Iceweasel/42.0', 'Referer' : ''}
select='[makelist.param1]'
select = select.replace('[', '').replace(']', '')
if select == 'Movies':
end = ''
elif select == 'Channels':
end = 'Cable'
elif select == 'Cable Tv':
end = '<li id="menu-item-209"'

r1 = requests.get(url, headers=headers)

part = re.findall('%s(?s)(.*)%s' % (select,end), r1.text)[-1]
part = part.replace('&','&')
return part
]]></expres>
<page></page>
</regex>

<regex>
<name>get-m3u8</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m,url= '[makelist2.param1]'):

import requests
import re
headers = {'User-Agent': 'Mozilla/5.0 (X11; Linux i686; rv:42.0) Gecko/20100101 Firefox/42.0 Iceweasel/42.0', 'Referer' : ''}
r1 = requests.get(url, headers=headers)

m3u8 = re.findall('source src="(.*?)"', r1.text)[0]
return m3u8

]]></expres>
<page></page>
<referer></referer>
</regex>
</item>

suport

Messages : 4
Date d'inscription : 2017-07-10

View user profile

Back to top Go down

Re: help with regex

Post by jujuuj on Sun 16 Jul - 20:32

first, all the ESPACES are missing at beginning of lines in the Python part of the code
... This is why YOU SHOULD use [code ] tags !!!!

then you should take the original code ... because part.replace('&','&')
do you think it is normal to replace a & by a & ? TAKE CARE of & amp; or & ... not the same ...

Finally, your item is probably well outdated ... so I pass ... Wink
avatar
jujuuj

Messages : 115
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Re: help with regex

Post by jujuuj on Sun 16 Jul - 20:36

I took a look a this regex and said what needed to be change
avatar
jujuuj

Messages : 115
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Re: help with regex

Post by suport on Mon 17 Jul - 0:07

thanks for your time jujuuj i was looking for a regex for Arconaitv and that was the only one i found again thanks for your time
p.s nice to see you here
jujuuj wrote:I took a look a this regex and said what needed to be change

suport

Messages : 4
Date d'inscription : 2017-07-10

View user profile

Back to top Go down

Re: help with regex

Post by solved on Tue 18 Jul - 11:27

if u want to work on it,  first be sure to copy the text decently ...  and don't lose the espaces or the amp;  when copying , writing without [code] tag or sending PM or posting ... study

solved

Messages : 35
Date d'inscription : 2017-06-27

View user profile

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum