Merge pull request #74 from alfa-jor/master

compatibility helix fix #69
This commit is contained in:
Alfa
2017-09-10 03:36:03 +02:00
committed by GitHub
6 changed files with 44 additions and 4 deletions

View File

@@ -369,7 +369,7 @@ configfilepath = os.path.join(get_data_path(), "settings.xml")
if not os.path.exists(get_data_path()):
os.mkdir(get_data_path())
# Literales
TRANSLATION_FILE_PATH = os.path.join(get_runtime_path(), "resources", "language", "resource.language.es_es", "strings.po")
TRANSLATION_FILE_PATH = os.path.join(get_runtime_path(), "resources", "language", "Spanish", "strings.po")
load_settings()
# modo adulto:

View File

@@ -21,14 +21,54 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = httptools.downloadpage(page_url).data
video_urls = []
matches = scrapertools.find_multiple_matches(data, 'type:"video/([^"]+)",src:"([^"]+)",height:(\d+)')
for ext, media_url, calidad in matches:
matches = scrapertools.find_multiple_matches(data, "type:\"video/([^\"]+)\",src:d\('([^']+)',(.*?)\).+?height:(\d+)")
for ext, encoded, code, quality in matches:
media_url = decode(encoded, int(code))
if not media_url.startswith("http"):
media_url = "http:" + media_url
video_urls.append([".%s %sp [streamango]" % (ext, calidad), media_url])
video_urls.append([".%s %sp [streamango]" % (ext, quality), media_url])
video_urls.reverse()
for video_url in video_urls:
logger.info("%s - %s" % (video_url[0], video_url[1]))
return video_urls
def decode(encoded, code):
logger.info("encoded '%s', code '%s'" % (encoded, code))
_0x59b81a = ""
k = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
k = k[::-1]
count = 0
for index in range(0, len(encoded) - 1):
while count <= len(encoded) - 1:
_0x4a2f3a = k.index(encoded[count])
count += 1
_0x29d5bf = k.index(encoded[count])
count += 1
_0x3b6833 = k.index(encoded[count])
count += 1
_0x426d70 = k.index(encoded[count])
count += 1
_0x2e4782 = ((_0x4a2f3a << 2) | (_0x29d5bf >> 4))
_0x2c0540 = (((_0x29d5bf & 15) << 4) | (_0x3b6833 >> 2))
_0x5a46ef = ((_0x3b6833 & 3) << 6) | _0x426d70
_0x2e4782 = _0x2e4782 ^ code
_0x59b81a = str(_0x59b81a) + chr(_0x2e4782)
if _0x3b6833 != 64:
_0x59b81a = str(_0x59b81a) + chr(_0x2c0540)
if _0x3b6833 != 64:
_0x59b81a = str(_0x59b81a) + chr(_0x5a46ef)
return _0x59b81a