aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2012-12-15 17:59:09 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2012-12-15 17:59:09 +0100
commit8f6f40d99180ab00c918a79641a1e5508e90c76a (patch)
treee899a2d989b3bb1a1ffe70681ccdc0c09c69a833 /youtube_dl
parente2a8ff24a9427b8402ee7771cc145a307811ed30 (diff)
downloadyoutube-dl-8f6f40d99180ab00c918a79641a1e5508e90c76a.tar.xz
More Youku Python 3 fixing
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/InfoExtractors.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index fd977d2d9..b1ede697a 100644
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -3349,7 +3349,8 @@ class YoukuIE(InfoExtractor):
self.report_extraction(video_id)
try:
- config = json.loads(jsondata)
+ jsonstr = jsondata.decode('utf-8')
+ config = json.loads(jsonstr)
video_title = config['data'][0]['title']
seed = config['data'][0]['seed']
@@ -3373,7 +3374,7 @@ class YoukuIE(InfoExtractor):
fileid = config['data'][0]['streamfileids'][format]
keys = [s['k'] for s in config['data'][0]['segs'][format]]
- except (ValueError, KeyError):
+ except (UnicodeDecodeError, ValueError, KeyError):
self._downloader.trouble(u'ERROR: unable to extract info section')
return