mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[extractor/generic] Don't report redirect to https
This commit is contained in:
parent
105bfd90f5
commit
4de88a6a36
1 changed files with 3 additions and 1 deletions
|
@ -2584,7 +2584,9 @@ def _real_extract(self, url):
|
||||||
**smuggled_data.get('http_headers', {})
|
**smuggled_data.get('http_headers', {})
|
||||||
})
|
})
|
||||||
new_url = full_response.geturl()
|
new_url = full_response.geturl()
|
||||||
if url != new_url:
|
if new_url == urllib.parse.urlparse(url)._replace(scheme='https').geturl():
|
||||||
|
url = new_url
|
||||||
|
elif url != new_url:
|
||||||
self.report_following_redirect(new_url)
|
self.report_following_redirect(new_url)
|
||||||
if force_videoid:
|
if force_videoid:
|
||||||
new_url = smuggle_url(new_url, {'force_videoid': force_videoid})
|
new_url = smuggle_url(new_url, {'force_videoid': force_videoid})
|
||||||
|
|
Loading…
Reference in a new issue