mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 03:03:01 +00:00
More Youku Python 3 fixing
This commit is contained in:
parent
e2a8ff24a9
commit
8f6f40d991
1 changed files with 3 additions and 2 deletions
|
@ -3349,7 +3349,8 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
self.report_extraction(video_id)
|
self.report_extraction(video_id)
|
||||||
try:
|
try:
|
||||||
config = json.loads(jsondata)
|
jsonstr = jsondata.decode('utf-8')
|
||||||
|
config = json.loads(jsonstr)
|
||||||
|
|
||||||
video_title = config['data'][0]['title']
|
video_title = config['data'][0]['title']
|
||||||
seed = config['data'][0]['seed']
|
seed = config['data'][0]['seed']
|
||||||
|
@ -3373,7 +3374,7 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
fileid = config['data'][0]['streamfileids'][format]
|
fileid = config['data'][0]['streamfileids'][format]
|
||||||
keys = [s['k'] for s in config['data'][0]['segs'][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')
|
self._downloader.trouble(u'ERROR: unable to extract info section')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue