aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-08-21 04:31:57 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-08-21 04:32:07 +0200
commit3093468977e5c04d7f39016bbe983c483e47707f (patch)
tree72ea8c05705e1df4072e8d280ca6c8aa5197b263 /youtube_dl/extractor/generic.py
parent79cb25776f46e0b9b1e95052fbd84a59440fa34f (diff)
[generic] Ignore stupid HTTP servers (#1284)
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r--youtube_dl/extractor/generic.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index b633e896c..1c468f8f6 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -107,8 +107,13 @@ class GenericIE(InfoExtractor):
return new_url
def _real_extract(self, url):
- new_url = self._test_redirect(url)
- if new_url: return [self.url_result(new_url)]
+ try:
+ 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]
try: