projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
264a704
)
[cnet] Fix title extraction
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 21 Jul 2014 11:03:18 +0000
(13:03 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 21 Jul 2014 11:03:19 +0000
(13:03 +0200)
URLs are still missing
youtube_dl/extractor/cnet.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/cnet.py
b/youtube_dl/extractor/cnet.py
index a94f42571746f21cc70ba2527e661952caca1c6f..710d5009b71aafe0da901771048b8c0ba68def04 100644
(file)
--- a/
youtube_dl/extractor/cnet.py
+++ b/
youtube_dl/extractor/cnet.py
@@
-43,7
+43,11
@@
class CNETIE(InfoExtractor):
raise ExtractorError('Cannot find video data')
video_id = vdata['id']
- title = vdata['headline']
+ title = vdata.get('headline')
+ if title is None:
+ title = vdata.get('title')
+ if title is None:
+ raise ExtractorError('Cannot find title!')
description = vdata.get('dek')
thumbnail = vdata.get('image', {}).get('path')
author = vdata.get('author')