浏览代码

Decode the reason given on YouTube errors to avoid crashes (fixes issue #193)

Ricardo Garcia 15 年之前
父节点
当前提交
8e686771af
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube-dl

+ 1 - 1
youtube-dl

@@ -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