Fix cb01->ultimi/e aggiornati/e, wstream e piccole migliorie

This commit is contained in:
mac12m99
2021-05-14 20:43:04 +02:00
parent bb4ccff339
commit f8647df9e0
6 changed files with 14 additions and 16 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ def test_video_exists(page_url):
global data
resp = httptools.downloadpage(page_url)
data = resp.data
if resp.code == 404:
if resp.code == 404 or 'Video is processing now' in data:
return False, config.get_localized_string(70449) % "Vidmoly"
return True, ""
+1 -1
View File
@@ -9,7 +9,7 @@ def test_video_exists(page_url):
page = httptools.downloadpage(page_url)
global data
data = page.data
if page.code == 404 or 'File is no longer available' in data:
if page.code == 404 or 'File is no longer available' in data or "We're sorry!" in data:
return False, config.get_localized_string(70449) % "VUP Player"
return True, ""
+2 -2
View File
@@ -19,12 +19,12 @@ errorsStr = ['Sorry this file is not longer available', 'Sorry this video is una
def test_video_exists(page_url):
logger.debug("(page_url='%s')" % page_url)
disable_directIP = False
# if 'swvideoid' in page_url: disable_directIP = True
if 'swvideoid' in page_url: disable_directIP = True
resp = httptools.downloadpage(page_url, verify=False, disable_directIP=disable_directIP, follow_redirects=False)
while resp.headers.get('location'):
page_url = resp.headers.get('location')
resp = httptools.downloadpage(page_url.replace('https:', 'http:'), verify=False, disable_directIP=disable_directIP, follow_redirects=False)
resp = httptools.downloadpage(page_url, verify=False, disable_directIP=disable_directIP, follow_redirects=False)
global data, real_url
data = resp.data