Files
addon/servers/decrypters/zcrypt.py
mac12m99 3fb9b068d9 KoD 0.4 (#57)
* fix next page

* testing new filmontv

* Wstream quick fix, no resolution displayed :(

* new filmontv

* now regex is ok

* fix .po files

* +netlovers

* working on filmontv

* fix debriders

* new updater

* updater

* fix crash

* fix updater and re-add dev mode

* new url eurostreaming

* Delete netlovers.py

* Delete netlovers.json

* -net from menù

* fix eurostreaming: numero stagione e newest (#50)

* fix canale

* fix newest

* fix numero puntata

* cleanup

* cleanup 2

* fix updater crash on windows

* Fix Animeworld

* Nuovo Autorenumber

* initial background downloader support

* ops

* Update channels.json

* Update channels.json

* fix openload

* move json update to cohesist with updater

* disable json url updates

* fix typo

* fix typo 2

* Add files via upload

* Add files via upload

* fix autoplay in community channels

* fix toonitalia

* Fix Toonitalia

* workaround serietvsubita

* Nuova Rinumerazione Automatica

* Fix per Rinumerazione Automatica

* workaround updater

* Fix on air

* ops

* Personalizzazione sezione "Oggi in TV"

* Aggiunto orario sezione Oggi in TV

* aggiunto bit.ly (#56)

* aggiunto bit.ly

* Aggiunta personalizzazione homepage

* Revert "initial background downloader support"

This reverts commit f676ab0f

* KoD 0.4
2019-06-30 10:35:48 +02:00

95 lines
4.0 KiB
Python

# -*- coding: utf-8 -*-
# Ringraziamo errmax e dr-z3r0
import re
from core import httptools, scrapertoolsV2
from platformcode import logger
from servers.decrypters import expurl
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
encontrados = {
'https://vcrypt.net/images/logo', 'https://vcrypt.net/css/out',
'https://vcrypt.net/images/favicon', 'https://vcrypt.net/css/open',
'http://linkup.pro/js/jquery', 'https://linkup.pro/js/jquery',
'http://www.rapidcrypt.net/open'
}
devuelve = []
patronvideos = [
r'(https?://(gestyy|rapidteria|sprysphere)\.com/[a-zA-Z0-9]+)',
r'(https?://(?:www\.)?(vcrypt|linkup)\.[^/]+/[^/]+/[a-zA-Z0-9_]+)'
]
for patron in patronvideos:
logger.info(" find_videos #" + patron + "#")
matches = re.compile(patron).findall(page_url)
for url, host in matches:
if url not in encontrados:
logger.info(" url=" + url)
encontrados.add(url)
if host == 'gestyy':
resp = httptools.downloadpage(
url,
follow_redirects=False,
cookies=False,
only_headers=True,
replace_headers=True,
headers={'User-Agent': 'curl/7.59.0'})
data = resp.headers.get("location", "")
elif 'vcrypt.net' in url:
from lib import unshortenit
data, status = unshortenit.unshorten(url)
logger.info("Data - Status zcrypt vcrypt.net: [%s] [%s] " %(data, status))
elif 'linkup' in url or 'bit.ly' in url:
idata = httptools.downloadpage(url).data
data = scrapertoolsV2.find_single_match(idata, "<iframe[^<>]*src=\\'([^'>]*)\\'[^<>]*>")
#fix by greko inizio
if not data:
data = scrapertoolsV2.find_single_match(idata, 'action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">')
from lib import unshortenit
data, status = unshortenit.unshorten(url)
logger.info("Data - Status zcrypt linkup : [%s] [%s] " %(data, status))
if '/speedx/' in data: # aggiunto per server speedvideo
data = data.replace('http://linkup.pro/speedx', 'http://speedvideo.net')
# fix by greko fine
else:
data = ""
while host in url:
resp = httptools.downloadpage(
url, follow_redirects=False)
url = resp.headers.get("location", "")
if not url:
data = resp.data
elif host not in url:
data = url
if data:
devuelve.append(data)
else:
logger.info(" url duplicada=" + url)
patron = r"""(https?://(?:www\.)?(?:threadsphere\.bid|adf\.ly|q\.gs|j\.gs|u\.bb|ay\.gy|linkbucks\.com|any\.gs|cash4links\.co|cash4files\.co|dyo\.gs|filesonthe\.net|goneviral\.com|megaline\.co|miniurls\.co|qqc\.co|seriousdeals\.net|theseblogs\.com|theseforums\.com|tinylinks\.co|tubeviral\.com|ultrafiles\.net|urlbeat\.net|whackyvidz\.com|yyv\.co|adfoc\.us|lnx\.lu|sh\.st|href\.li|anonymz\.com|shrink-service\.it|rapidcrypt\.net|ecleneue\.com)/[^"']+)"""
logger.info(" find_videos #" + patron + "#")
matches = re.compile(patron).findall(page_url)
for url in matches:
if url not in encontrados:
logger.info(" url=" + url)
encontrados.add(url)
long_url = expurl.expand_url(url)
if long_url:
devuelve.append(long_url)
else:
logger.info(" url duplicada=" + url)
ret = page_url+" "+str(devuelve) if devuelve else page_url
logger.info(" RET=" + str(ret))
return ret