diff --git a/plugin.video.alfa/servers/streamplay.py b/plugin.video.alfa/servers/streamplay.py index 427762b3..ae8231bd 100644 --- a/plugin.video.alfa/servers/streamplay.py +++ b/plugin.video.alfa/servers/streamplay.py @@ -36,14 +36,20 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= packed = scrapertools.find_single_match(data, "") unpacked = jsunpack.unpack(packed) - var = scrapertools.find_single_match(data, 'var _0x[0-f]+=(\[[^;]+\]);') + #var = scrapertools.find_single_match(data, 'var _0x[0-f]+=(\[[^;]+\]);') url = scrapertools.find_single_match(unpacked, '(http[^,]+\.mp4)') - itemlist.append([".mp4" + " [streamplay]", S(var).decode(url)]) + #itemlist.append([".mp4" + " [streamplay]", S(var).decode(url)]) + itemlist.append([".mp4" + " [streamplay]", decode_video_url(url)]) itemlist.sort(key=lambda x: x[0], reverse=True) return itemlist +def decode_video_url(url): + tria = re.compile('[0-9a-z]{40,}', re.IGNORECASE).findall(url)[0] + gira = tria[::-1] + x = gira[:2] + gira[3:] + return re.sub(tria, x, url) class S: def __init__(self, var):