aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-04-21 20:34:03 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-04-21 20:34:03 +0200
commitd11271dd2907d2552ef61b61270bc41d8149cc5a (patch)
treed25a8655d7afe9decdd9f1655f2931e61423140b /youtube_dl/extractor/youtube.py
parent1d9d26d09b1c36274553df639c8550d3f2342e72 (diff)
[youtube] Include video Id in common error message (Fixes #2786)
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index c87c7e903..91fda4eef 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1082,9 +1082,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
break
if 'token' not in video_info:
if 'reason' in video_info:
- raise ExtractorError(u'YouTube said: %s' % video_info['reason'][0], expected=True)
+ raise ExtractorError(
+ u'YouTube said: %s' % video_info['reason'][0],
+ expected=True, video_id=video_id)
else:
- raise ExtractorError(u'"token" parameter not in video info for unknown reason')
+ raise ExtractorError(
+ u'"token" parameter not in video info for unknown reason',
+ video_id=video_id)
if 'view_count' in video_info:
view_count = int(video_info['view_count'][0])