projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8588a86
)
Fix YoukuIE in Python3 (and in general)
author
Philipp Hagemeister
<phihag@phihag.de>
Sat, 15 Dec 2012 16:57:13 +0000
(17:57 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sat, 15 Dec 2012 16:57:13 +0000
(17:57 +0100)
youtube_dl/InfoExtractors.py
patch
|
blob
|
history
diff --git
a/youtube_dl/InfoExtractors.py
b/youtube_dl/InfoExtractors.py
index 1f5e189679989a030e1a11c31123a544e0e8ed06..fd977d2d99878228137cab321fd81321cdbdaa69 100644
(file)
--- a/
youtube_dl/InfoExtractors.py
+++ b/
youtube_dl/InfoExtractors.py
@@
-3372,15
+3372,8
@@
class YoukuIE(InfoExtractor):
fileid = config['data'][0]['streamfileids'][format]
- seg_number = len(config['data'][0]['segs'][format])
-
- keys=[]
- for i in xrange(seg_number):
- keys.append(config['data'][0]['segs'][format][i]['k'])
-
- #TODO check error
- #youku only could be viewed from mainland china
- except:
+ keys = [s['k'] for s in config['data'][0]['segs'][format]]
+ except (ValueError, KeyError):
self._downloader.trouble(u'ERROR: unable to extract info section')
return