Correcciones powvideo y streamplay

This commit is contained in:
pipcat
2018-08-28 18:30:17 +02:00
parent cc7b7e0819
commit edc40358a7
2 changed files with 10 additions and 5 deletions
+9 -4
View File
@@ -33,11 +33,16 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
url = scrapertools.find_single_match(unpacked, "(?:src):\\\\'([^\\\\]+.mp4)\\\\'")
a, b = scrapertools.find_single_match(data, "\['splice'\]\(0x([0-9a-fA-F]*),0x([0-9a-fA-F]*)\);")
if a and b:
url = decode_powvideo_url(url, int(a, 16), int(b, 16))
matches = scrapertools.find_single_match(data, "\['splice'\]\(0x([0-9a-fA-F]*),0x([0-9a-fA-F]*)\);")
if matches:
url = decode_powvideo_url(url, int(matches[0], 16), int(matches[1], 16))
else:
logger.debug('No detectado splice! Revisar sistema de decode...')
matches = scrapertools.find_single_match(data, "\(0x([0-9a-fA-F]*),0x([0-9a-fA-F]*)\);")
if matches:
url = decode_powvideo_url(url, int(matches[0], 16), int(matches[1], 16))
else:
logger.debug('No detectado splice! Revisar sistema de decode...')
# ~ logger.debug(data)
itemlist.append([".mp4" + " [powvideo]", url])
itemlist.sort(key=lambda x: x[0], reverse=True)
+1 -1
View File
@@ -46,5 +46,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
def decode_video_url(url):
tria = re.compile('[0-9a-z]{40,}', re.IGNORECASE).findall(url)[0]
gira = tria[::-1]
x = gira[:3] + gira[4:]
x = gira[:4] + gira[6:]
return re.sub(tria, x, url)