mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
Throw a better error if the protocol is invalid
This commit is contained in:
parent
99a5ae3f8e
commit
419c64b107
1 changed files with 2 additions and 0 deletions
|
@ -1304,6 +1304,8 @@ def http_error_405(self, req, fp, code, msg, headers):
|
|||
opener.add_handler(handler())
|
||||
|
||||
response = opener.open(HeadRequest(url))
|
||||
if response is None:
|
||||
raise ExtractorError(u'Invalid URL protocol')
|
||||
new_url = response.geturl()
|
||||
|
||||
if url == new_url:
|
||||
|
|
Loading…
Reference in a new issue