mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-09-08 09:35:01 +00:00
Properly detect YouTube error messages to print them on screen (fixes issue #172)
This commit is contained in:
parent
06f34701fe
commit
f95f29fd25
|
@ -844,6 +844,14 @@ class YoutubeIE(InfoExtractor):
|
||||||
except (urllib2.URLError, httplib.HTTPException, socket.error), err:
|
except (urllib2.URLError, httplib.HTTPException, socket.error), err:
|
||||||
self._downloader.trouble(u'ERROR: unable to download video info webpage: %s' % str(err))
|
self._downloader.trouble(u'ERROR: unable to download video info webpage: %s' % str(err))
|
||||||
return
|
return
|
||||||
|
if 'token' not in video_info:
|
||||||
|
if 'reason' in video_info:
|
||||||
|
self._downloader.trouble(u'ERROR: YouTube said: %s' % video_info['reason'][0])
|
||||||
|
else:
|
||||||
|
self._downloader.trouble(u'ERROR: "token" parameter not in video info for unknown reason')
|
||||||
|
return
|
||||||
|
|
||||||
|
# Start extracting information
|
||||||
self.report_information_extraction(video_id)
|
self.report_information_extraction(video_id)
|
||||||
|
|
||||||
# uploader
|
# uploader
|
||||||
|
|
Loading…
Reference in a new issue