fix mixdrop

This commit is contained in:
mac12m99
2020-01-25 11:59:23 +01:00
committed by marco
parent 01545db6c4
commit 898d237e1c

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])