aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-03-04 23:57:05 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-03-04 23:59:58 +0800
commitfa880d20ad2a2185d9ea691f8a2fa5cfbfbbb1b2 (patch)
treedc6e1bc08697fd7f911c4b156a67a37d45c86992
parentae7d31af1cd1b9c2f1cae86acb8a4156556dc748 (diff)
[kusi] Two fixes
Thanks @dstftw for pointing out those
-rw-r--r--youtube_dl/extractor/kusi.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/youtube_dl/extractor/kusi.py b/youtube_dl/extractor/kusi.py
index 5d458e31e..f74dbbf76 100644
--- a/youtube_dl/extractor/kusi.py
+++ b/youtube_dl/extractor/kusi.py
@@ -68,13 +68,11 @@ class KUSIIE(InfoExtractor):
doc = self._download_xml(xml_url, video_id)
- video_title = xpath_text(doc, 'HEADLINE')
- duration = float_or_none(
- xpath_text(doc, 'DURATION', fatal=False), scale=1000)
- description = xpath_text(doc, 'ABSTRACT', fatal=False)
- thumbnail = xpath_text(doc, './THUMBNAILIMAGE/FILENAME', fatal=False)
- createtion_time = timeconvert(
- xpath_text(doc, 'rfc822creationdate', fatal=False))
+ video_title = xpath_text(doc, 'HEADLINE', fatal=True)
+ duration = float_or_none(xpath_text(doc, 'DURATION'), scale=1000)
+ description = xpath_text(doc, 'ABSTRACT')
+ thumbnail = xpath_text(doc, './THUMBNAILIMAGE/FILENAME')
+ createtion_time = timeconvert(xpath_text(doc, 'rfc822creationdate'))
quality_options = doc.find('{http://search.yahoo.com/mrss/}group').findall('{http://search.yahoo.com/mrss/}content')
formats = []
@@ -83,7 +81,7 @@ class KUSIIE(InfoExtractor):
'url': compat_urllib_parse_unquote_plus(quality.attrib['url']),
'height': int_or_none(quality.attrib.get('height')),
'width': int_or_none(quality.attrib.get('width')),
- 'vbr': float_or_none(quality.attrib.get('bitratebits'), scale=1024),
+ 'vbr': float_or_none(quality.attrib.get('bitratebits'), scale=1000),
})
self._sort_formats(formats)