fix dooplay_get_links e Wstream

This commit is contained in:
Alhaziel01
2020-06-19 17:57:57 +02:00
parent 68d79694a9
commit 935887cce7
2 changed files with 16 additions and 2 deletions
+13
View File
@@ -7,6 +7,7 @@ import re
try:
import urllib.parse as urllib
# unichr = chr
except ImportError:
import urllib
@@ -32,6 +33,18 @@ def test_video_exists(page_url):
page_url = 'https://116.202.226.34/video.php?file_code=' + code
data = httptools.downloadpage(page_url, headers=headers, follow_redirects=True, verify=False).data
if 'nored.icu' in str(headers):
var = scrapertools.find_single_match(data, r'var [a-zA-Z0-9]+ = \[([^\]]+).*?')
value = scrapertools.find_single_match(data, r'String\.fromCharCode\(parseInt\(value\) \D (\d+)')
if var and value:
dec = ''
for v in var.split(','):
dec += chr(int(v) - int(value))
page_url = scrapertools.find_single_match(dec, "src='([^']+)")
new_data = httptools.downloadpage(page_url, headers=headers, follow_redirects=True, verify=False).data
if new_data:
data = new_data
real_url = page_url
if "Not Found" in data or "File was deleted" in data or 'Video is processing' in data or 'Sorry this video is unavailable' in data:
return False, config.get_localized_string(70449) % 'Wstream'