mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 10:31:29 +00:00
[generic] Ignore stupid HTTP servers (#1284)
This commit is contained in:
parent
79cb25776f
commit
3093468977
|
@ -107,8 +107,13 @@ def http_error_405(self, req, fp, code, msg, headers):
|
||||||
return new_url
|
return new_url
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
new_url = self._test_redirect(url)
|
try:
|
||||||
if new_url: return [self.url_result(new_url)]
|
new_url = self._test_redirect(url)
|
||||||
|
if new_url:
|
||||||
|
return [self.url_result(new_url)]
|
||||||
|
except compat_urllib_error.HTTPError:
|
||||||
|
# This may be a stupid server that doesn't like HEAD, our UA, or so
|
||||||
|
pass
|
||||||
|
|
||||||
video_id = url.split('/')[-1]
|
video_id = url.split('/')[-1]
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue