This commit is contained in:
Alhaziel
2020-01-25 16:09:45 +01:00
4 changed files with 17 additions and 4 deletions

View File

@@ -14,7 +14,11 @@ list_quality = ['default']
def findhost():
permUrl = httptools.downloadpage('https://www.cinemalibero.online/', follow_redirects=False).headers
return 'https://www.' + permUrl['location'].replace('https://www.google.com/search?q=site:', '')
import urlparse
p = list(urlparse.urlparse(permUrl['location'].replace('https://www.google.com/search?q=site:', '')))
if not p[0]:
p[0] = 'https'
return urlparse.urlunparse(p)
host = config.get_channel_url(findhost)
headers = [['Referer', host]]

View File

@@ -253,7 +253,7 @@ def downloadpage(url, **opt):
load_cookies()
domain = urlparse.urlparse(url).netloc
CF = False
if domain in ['www.guardaserie.media', 'casacinema.space', 'wstream.video', 'akvideo.stream', 'backin.net', 'dreamsub.stream']:
if domain in ['www.guardaserie.media', 'casacinema.space', 'wstream.video', 'akvideo.stream', 'backin.net', 'dreamsub.stream', 'altadefinizione-nuovo.link']:
from lib import cloudscraper
session = cloudscraper.create_scraper()
CF = True

View File

@@ -515,7 +515,8 @@ class UnshortenIt(object):
return uri, r.code if r else 200
except Exception as e:
return uri, str(e)
logger.error(e)
return uri, 0
def _unshorten_linkup(self, uri):

View File

@@ -25,7 +25,15 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
packed = scrapertools.find_single_match(data, r'(eval.*?)</script>')
unpacked = jsunpack.unpack(packed)
media_url = scrapertools.find_single_match(unpacked, r'MDCore\.furl\s*=\s*"([^"]+)"')
# mixdrop like to change var name very often, hoping that will catch every
list_vars = scrapertools.find_multiple_matches(unpacked, r'MDCore\.\w+\s*=\s*"([^"]+)"')
for var in list_vars:
if '.mp4' in var:
media_url = var
break
else:
media_url = ''
if not media_url.startswith('http'):
media_url = 'http:%s' % media_url
video_urls.append(["%s [Mixdrop]" % ext, media_url])