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]
"
*** Doc. Kodi & PYthon ***
.
.
Python & Modules PY
.
.
.
.
(Video) Cache Kodi
.
.
.
Addons Kodi
.
.
.
Addons Kodi
.
.
*** GITHUB ***
.
.
URLresolver (J.S.) [GIT] +
.
.
.
URLresolver (elD.) [GIT] -
.
.
URLresolver (tvA.) [GIT] -
.
.
.
.
Cloudflare (external) [GIT]
.
.
.
*** 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)
.
.
FRIENDS / PARTNERS

£$π community

créer un forum


one part of code is working, but the other part don't work, please help to fix the code

Go down

one part of code is working, but the other part don't work, please help to fix the code Empty one part of code is working, but the other part don't work, please help to fix the code

Post by vbprofi on Fri 15 Mar - 2:29

the streams from part of else: don't work. header and cookies included, what is the problem? please help to fix it.
Code:

<item>
<title>tv-de.com</title>
<link>$doregex[makelist]</link>

<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param3]</title>
<link>$doregex[get=URL]|User-Agent=iPhone</link>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import requests, re
def GetLSProData(page_data,Cookie_Jar,m):#vbprofi
 url = 'http://www.tv-de.com/category/deutsche-tv/'
 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36','Referer': url}
 sourceSX = requests.get(url, headers=headers)
 return re.findall('(?s)<a href="(.*?)".*?<img src="(.*?)".*?alt="(.*?)"', re.findall('<h1.*?Deutsche TV</h1>(?s)(.*?)<h2>', sourceSX.text)[0])
]]></expres>
<page></page>
<cookieJar></cookieJar>
</regex>

<regex>
<name>get=URL</name>
<expres><![CDATA[#$pyFunction
import requests, re
def GetLSProData(page_data,Cookie_Jar,m):#vbprofi
 url = '[makelist.param1]'
 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36','Referer': url}
 sourceSX = requests.get(url, headers=headers)
 item = re.findall('source:.+?(http.*m3u8.*?)[\'\"]', sourceSX.text)[0]

 if 'm3u8' in item:
  play = item + '|headers'
  return play
 else: #get streamurl from iframe
  url = re.findall('<iframe src="(.*?)"', sourceSX.text)[0]
  session = requests.Session()
  session.cookies = Cookie_Jar
  cookies = session.cookies
  sourceSX = requests.get(url, headers=headers, cookies = cookies)
  play = re.findall(r'file:.*?[\'"](http.*?m3u.*?)[\'"]', sourceSX.text)[0]
  return play
]]></expres>
<page></page>
<cookieJar></cookieJar>
</regex>
</item>

vbprofi

Messages : 89
Date d'inscription : 2017-05-03

View user profile

Back to top Go down

one part of code is working, but the other part don't work, please help to fix the code Empty Re: one part of code is working, but the other part don't work, please help to fix the code

Post by vbprofi on Tue 19 Mar - 15:35

have nobody an idea?

vbprofi

Messages : 89
Date d'inscription : 2017-05-03

View user profile

Back to top Go down

one part of code is working, but the other part don't work, please help to fix the code Empty Re: one part of code is working, but the other part don't work, please help to fix the code

Post by efradncr on Tue 19 Mar - 20:19

Esto lo encontré en mi basurero de regex talvez puedas hacerlo funcionar creo que por geobloqueo a mi no me funciona
Code:


<item>
<title>CANALES DE ALEMANIA</title>
<link>$doregex[makelist]</link>

<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR cyan][makelist.param3][/COLOR]</title>
<link>$doregex[play]|User-Agent=iPhone</link>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>

<expres><![CDATA[<div class="movie.*?">.*?\n.*?<a href="(.*?)">.*?\n.*?<img src="(.*?)".*?alt="(.*?)"]]></expres>
<page>http://www.pro7livestream.com/category/deutsche-tv-live/</page>
</regex>

<regex>
<name>stream</name>
<expres><![CDATA[<p><iframe src="(.*?)"]]></expres>
<page>[makelist.param1]</page>
</regex>

<regex>
<name>play</name>
<expres><![CDATA[source:"(http.*?m3u8.*?)"]]></expres>
<page>$doregex[stream]</page>
</regex>
</item>





Last edited by efradncr on Tue 19 Mar - 20:22; edited 1 time in total (Reason for editing : Edita)

efradncr

Messages : 42
Date d'inscription : 2018-02-02

View user profile

Back to top Go down

one part of code is working, but the other part don't work, please help to fix the code Empty Re: one part of code is working, but the other part don't work, please help to fix the code

Post by Goldonx on Tue 19 Mar - 21:33

vbprofi wrote:the streams from part of else: don't work. header and cookies included, what is the problem? please help to fix it.
Code:

<item>
<title>tv-de.com</title>
<link>$doregex[makelist]</link>

<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param3]</title>
<link>$doregex[get=URL]|User-Agent=iPhone</link>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import requests, re
def GetLSProData(page_data,Cookie_Jar,m):#vbprofi
 url = 'http://www.tv-de.com/category/deutsche-tv/'
 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36','Referer': url}
 sourceSX = requests.get(url, headers=headers)
 return re.findall('(?s)<a href="(.*?)".*?<img src="(.*?)".*?alt="(.*?)"', re.findall('<h1.*?Deutsche TV</h1>(?s)(.*?)<h2>', sourceSX.text)[0])
]]></expres>
<page></page>
<cookieJar></cookieJar>
</regex>

<regex>
<name>get=URL</name>
<expres><![CDATA[#$pyFunction
import requests, re
def GetLSProData(page_data,Cookie_Jar,m):#vbprofi
 url = '[makelist.param1]'
 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36','Referer': url}
 sourceSX = requests.get(url, headers=headers)
 item = re.findall('source:.+?(http.*m3u8.*?)[\'"]', sourceSX.text)[0]

 if 'm3u8' in item:
  play = item + '|headers'
  return play
 else: #get streamurl from iframe
  url = re.findall('<iframe src="(.*?)"', sourceSX.text)[0]
  session = requests.Session()
  session.cookies = Cookie_Jar
  cookies = session.cookies
  sourceSX = requests.get(url, headers=headers, cookies = cookies)
  play = re.findall(r'file:.*?[\'"](http.*?m3u.*?)[\'"]', sourceSX.text)[0]
  return play
]]></expres>
<page></page>
<cookieJar></cookieJar>
</regex>
</item>

First regular expression in the 'makelist'  is not precise, in that way, for example, rtl2 corresponds to the address of rtl and so on. This is important for the Referer in the url stream. In the "get=URL" regex there are several mistakes.


Code:
<item>
<title>tv-de.com</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param3]</title>
<link>$doregex[get=URL]</link>
<thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import requests, re
def GetLSProData(page_data,Cookie_Jar,m):#vbprofi
 url = 'http://www.tv-de.com/category/deutsche-tv/'
 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36','Referer': url}
 sourceSX = requests.get(url, headers=headers)
 return re.findall('(?s)<a href="([^"]+)"[^<]+<img src="([^"]+)".*?alt="(.*?)"', re.findall('<h1.*?Deutsche TV</h1>(?s)(.*?)<h2>', sourceSX.text)[0])
]]></expres>
<page></page>
<cookieJar></cookieJar>
</regex>
<regex>
<name>get=URL</name>
<expres><![CDATA[#$pyFunction
import requests, re
def GetLSProData(page_data,Cookie_Jar,m):
 ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36'
 headers = {'User-Agent': ua,'Referer': '[makelist.param1]'}

 if 'm3u8' in page_data:
   return re.findall('source:.+?(http.*m3u8.*?)[\'\"]', page_data)[0]+'|User-Agent='+ua+'&Referer=[makelist.param1]'
 else: #get streamurl from iframe
   item = re.findall('<iframe src="(.*?)"', page_data)[0]
   source = requests.get(item, headers=headers)
   return re.findall(r'file:.*?[\'"](http.*?m3u.*?)[\'"]', source.text)[0]+'|User-Agent='+ua+'&Referer='+item
]]></expres>
<page>[makelist.param1]</page>
<referer>http://www.tv-de.com/category/deutsche-tv/</referer>
<agent>Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36</agent>
<cookieJar></cookieJar>
</regex>
</item>

Goldonx

Messages : 39
Date d'inscription : 2018-02-11

View user profile

Back to top Go down

one part of code is working, but the other part don't work, please help to fix the code Empty Re: one part of code is working, but the other part don't work, please help to fix the code

Post by vbprofi on Wed 20 Mar - 1:26

wow, good job. your code is working well. thank you verry much!!!

vbprofi

Messages : 89
Date d'inscription : 2017-05-03

View user profile

Back to top Go down

one part of code is working, but the other part don't work, please help to fix the code Empty Re: one part of code is working, but the other part don't work, please help to fix the code

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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