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

TVaddon's  community

créer un forum


help, regex for Telerium

Go down

help, regex for Telerium Empty help, regex for Telerium

Post by adrianhn on Tue 19 Feb - 16:13

hi, any help with the regex for telerium streams

hxxp://maxdeportv.net/indexa.php?canal=1

this doesn´t work any more.
Code:


<link>$doregex[get-url]</link>
<regex>
<name>get-url</name>
<expres><![CDATA[#$pyFunction
from resolveurl.plugins.lib import jsunpack
def GetLSProData(page_data,Cookie_Jar,m):
    import re
    import requests
    mozhdr = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0',
              'Referer': 'http://maxdeportv.net/'}
    url = 'http://maxdeportv.net/indexa.php?canal=1'
    html = requests.get(url, headers=mozhdr).text
    cid = re.findall("id='([^']+).+?telerium", html)[0]
    eurl = 'https://telerium.tv/embed/{}.html'.format(cid)
    ehtml = requests.get(eurl, headers=mozhdr).text
    edata = re.findall('(eval\(function\(p,a,c,k,e,d.*)', ehtml)[0]
    epage = jsunpack.unpack(edata).replace('\\', '')
    strvar = re.findall('source:([^,]+),mime', epage)[0]
    str1 = re.findall('{}=atob\(rSt\(([^)]+)'.format(strvar), epage)[0]
    str2 = re.findall('{}="([^"]+)'.format(str1), epage)[0][::-1].decode('base64')
    tok1, tok2 = re.findall('{url:atob\(rSt\(([^)]+)\)\)\+atob\(rSt\(([^)]+)', epage)[0]
    tok1 = re.findall('{}="([^"]+)'.format(tok1), epage)[0][::-1].decode('base64')
    tok2 = re.findall('{}="([^"]+)'.format(tok2), epage)[0][::-1].decode('base64')
    tokurl = 'https:{}{}'.format(tok1, tok2)
    mozhdr['Referer'] = eurl
    token = requests.get(tokurl, headers=mozhdr).text[::-1][1:-1]
    strurl = 'https:{}{}|Referer={}&User-Agent={}'.format(str2, token, eurl, mozhdr['User-Agent'])
    return strurl
]]></expres>
<page></page>
</regex>



thks for the help

adrianhn

Messages : 45
Date d'inscription : 2017-04-17

View user profile

Back to top Go down

help, regex for Telerium Empty Re: help, regex for Telerium

Post by Goldonx on Wed 20 Feb - 19:22

Here:
Code:
<item>
<title>Telerium</title>
<link>$doregex[get-url]</link>
<regex>
<name>get-url</name>
<expres><![CDATA[#$pyFunction
from resolveurl.plugins.lib import jsunpack
def GetLSProData(page_data,Cookie_Jar,m):
    import re
    import requests
    mozhdr = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0', 'Referer': 'http://maxdeportv.net/'}
    url = 'http://maxdeportv.net/indexa.php?canal=1'
    html = requests.get(url, headers=mozhdr, verify=False).text
    cid = re.findall('id="([^"]+).+?telerium', html)[0]
    eurl = 'https://telerium.tv/embed/{}.html'.format(cid)
    ehtml = requests.get(eurl, headers=mozhdr,verify=False).text
    edata = re.findall('(eval\(function\(p,a,c,k,e,d.*)', ehtml)[0]
    epage = jsunpack.unpack(edata).replace('\\', '')
    refvar1,refvar2 = re.findall('url:atob\((\w+)\).*?atob\((\w+)\)', epage)[0]
    refvar3 = re.findall('country,(\w+),', epage)[0]
    file = re.findall('{}="([^"]+)'.format(refvar3), epage)[0].decode('base64')
    url_part1 = re.findall('{}="([^"]+)'.format(refvar1), epage)[0].decode('base64')
    url_part2 = re.findall('{}="([^"]+)'.format(refvar2), epage)[0].decode('base64')
    tokurl = 'https://telerium.tv{}{}'.format(url_part1, url_part2)
    mozhdr['Referer'] = eurl
    token = requests.get(tokurl, headers=mozhdr, verify=False).text[1:-1]
    return 'https:{}{}|Referer={}&User-Agent={}'.format(file, token, eurl, mozhdr['User-Agent'])
]]></expres>
<page></page>
</regex>
</item>

Goldonx

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

View user profile

Back to top Go down

help, regex for Telerium Empty Re: help, regex for Telerium

Post by adrianhn on Thu 21 Feb - 16:20

thks goldonx

adrianhn

Messages : 45
Date d'inscription : 2017-04-17

View user profile

Back to top Go down

help, regex for Telerium Empty Re: help, regex for Telerium

Post by ceb2004 on Thu 6 Jun - 22:38

Hi Goldonx,

it seems that something has been changed since february.

I´m not skilled in js, but had tryed to learn from google.

Actual extract:
Code:



url:atob(FnpbJAziSG).slice(12)+atob(FnpbJAziSGa)
FnpbJAziSG="L2Z1Y2t5b3VybW9tL2luZ2VzdDAxMi8yNTcxNi5tM3U4P3NmPU1UQTRiVVJsYWs0NVVBPT0="
FnpbJAziSGa="JnRva2VuPXlCTUlrZzFfYXhfUV81Y1FjbzZTS2cmZXhwaXJlcz0xNTU5NjkzNDc0JnJuZD0yNTcxNg=="


seems to must be resolved in order to get the url.

I could´t find 'country,(........),' , so I have to guess the token url ("https://telerium.tv/", perhaps?).
I´d be glad for any advice.

Best regards

Goldonx wrote:Here:
Code:
<item>
<title>Telerium</title>
<link>$doregex[get-url]</link>
<regex>
<name>get-url</name>
<expres><![CDATA[#$pyFunction
from resolveurl.plugins.lib import jsunpack
def GetLSProData(page_data,Cookie_Jar,m):
    import re
    import requests
    mozhdr = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0', 'Referer': 'http://maxdeportv.net/'}
    url = 'http://maxdeportv.net/indexa.php?canal=1'
    html = requests.get(url, headers=mozhdr, verify=False).text
    cid = re.findall('id="([^"]+).+?telerium', html)[0]
    eurl = 'https://telerium.tv/embed/{}.html'.format(cid)
    ehtml = requests.get(eurl, headers=mozhdr,verify=False).text
    edata = re.findall('(eval\(function\(p,a,c,k,e,d.*)', ehtml)[0]
    epage = jsunpack.unpack(edata).replace('\\', '')
    refvar1,refvar2 = re.findall('url:atob\((\w+)\).*?atob\((\w+)\)', epage)[0]
    refvar3 = re.findall('country,(\w+),', epage)[0]
    file = re.findall('{}="([^"]+)'.format(refvar3), epage)[0].decode('base64')
    url_part1 = re.findall('{}="([^"]+)'.format(refvar1), epage)[0].decode('base64')
    url_part2 = re.findall('{}="([^"]+)'.format(refvar2), epage)[0].decode('base64')
    tokurl = 'https://telerium.tv{}{}'.format(url_part1, url_part2)
    mozhdr['Referer'] = eurl
    token = requests.get(tokurl, headers=mozhdr, verify=False).text[1:-1]
    return 'https:{}{}|Referer={}&User-Agent={}'.format(file, token, eurl, mozhdr['User-Agent'])
]]></expres>
<page></page>
</regex>
</item>

ceb2004

Messages : 1
Date d'inscription : 2019-06-06

View user profile

Back to top Go down

help, regex for Telerium Empty Re: help, regex for Telerium

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


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