fix wstream e animesaturn

This commit is contained in:
mac12m99
2021-05-15 10:38:41 +02:00
parent 7f33326403
commit c3f84281f8
3 changed files with 31 additions and 8 deletions

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)
resp = httptools.downloadpage(page_url.replace('https:', 'http:'), 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, verify=False, disable_directIP=disable_directIP, follow_redirects=False)
resp = httptools.downloadpage(page_url.replace('https:', 'http:'), verify=False, disable_directIP=disable_directIP, follow_redirects=False)
global data, real_url
data = resp.data