mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-03 03:57:26 +00:00
Decode the reason given on YouTube errors to avoid crashes (fixes issue #193)
This commit is contained in:
parent
2933532c5b
commit
8e686771af
1 changed files with 1 additions and 1 deletions
|
@ -849,7 +849,7 @@ class YoutubeIE(InfoExtractor):
|
||||||
return
|
return
|
||||||
if 'token' not in video_info:
|
if 'token' not in video_info:
|
||||||
if 'reason' in video_info:
|
if 'reason' in video_info:
|
||||||
self._downloader.trouble(u'ERROR: YouTube said: %s' % video_info['reason'][0])
|
self._downloader.trouble(u'ERROR: YouTube said: %s' % video_info['reason'][0].decode('utf-8'))
|
||||||
else:
|
else:
|
||||||
self._downloader.trouble(u'ERROR: "token" parameter not in video info for unknown reason')
|
self._downloader.trouble(u'ERROR: "token" parameter not in video info for unknown reason')
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue