projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e2a8ff2
)
More Youku Python 3 fixing
author
Philipp Hagemeister
<phihag@phihag.de>
Sat, 15 Dec 2012 16:59:09 +0000
(17:59 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sat, 15 Dec 2012 16:59:09 +0000
(17:59 +0100)
youtube_dl/InfoExtractors.py
patch
|
blob
|
history
diff --git
a/youtube_dl/InfoExtractors.py
b/youtube_dl/InfoExtractors.py
index fd977d2d99878228137cab321fd81321cdbdaa69..b1ede697a7bedd5260072450f57a8939988c8e28 100644
(file)
--- a/
youtube_dl/InfoExtractors.py
+++ b/
youtube_dl/InfoExtractors.py
@@
-3349,7
+3349,8
@@
class YoukuIE(InfoExtractor):
self.report_extraction(video_id)
try:
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']
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]]
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
self._downloader.trouble(u'ERROR: unable to extract info section')
return