Fix maxstream

This commit is contained in:
mac12m99
2021-10-08 19:27:02 +02:00
parent cb9fc5b5f3
commit 68f5b13d67
3 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -40,8 +40,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
char_codes = ast.literal_eval(match[0])
hidden_js = "".join([chr(c - int(match[1])) for c in char_codes])
newurl = scrapertools.find_single_match(hidden_js, r'\$.get\(\'([^\']+)')
castpage = httptools.downloadpage(newurl, headers={'x-requested-with': 'XMLHttpRequest', 'Referer': page_url }).data
newurl = scrapertools.find_single_match(hidden_js, r'\$.get\(\'([^\']+)').replace('https://', 'http://')
castpage = httptools.downloadpage(newurl, headers={'x-requested-with': 'XMLHttpRequest', 'Referer': page_url}).data
url_video = scrapertools.find_single_match(castpage, r"cc\.cast\('(http[s]?.[^']+)'")
else:
logger.debug('Something wrong: no url found before that :(')