[ie/generic] Follow https redirects properly (#9121)

Authored by: seproDev
This commit is contained in:
sepro 2024-03-09 01:16:04 +01:00 committed by GitHub
parent df773c3d5d
commit c8c9039e64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2394,7 +2394,6 @@ def _real_extract(self, url):
'Referer': smuggled_data.get('referer'),
}))
new_url = full_response.url
url = urllib.parse.urlparse(url)._replace(scheme=urllib.parse.urlparse(new_url).scheme).geturl()
if new_url != extract_basic_auth(url)[0]:
self.report_following_redirect(new_url)
if force_videoid: