summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYen Chi Hsuan <[email protected]>2015-01-28 00:13:40 +0800
committerYen Chi Hsuan <[email protected]>2015-01-28 00:13:40 +0800
commit6348ad12a057cc1c454488ce7c37070cf39a8f06 (patch)
tree03e08f8bca6d9e35ccb62153dde87e81d036a7e0
parentfe7710cbccdade0b66ef48a7e2eedad71a0702cc (diff)
downloadyoutube-dl-6348ad12a057cc1c454488ce7c37070cf39a8f06.tar.gz
youtube-dl-6348ad12a057cc1c454488ce7c37070cf39a8f06.zip
[xuite] Add height information for the two formats
-rw-r--r--youtube_dl/extractor/xuite.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/youtube_dl/extractor/xuite.py b/youtube_dl/extractor/xuite.py
index 943757c27..aef9a14a3 100644
--- a/youtube_dl/extractor/xuite.py
+++ b/youtube_dl/extractor/xuite.py
@@ -129,17 +129,17 @@ class XuiteIE(InfoExtractor):
}
if 'hq_src' in flv_config:
- src = flv_config['src']
- src_hq = flv_config['hq_src']
- ret_attrs['formats'] = [{
- 'url': src,
- 'ext': self._guess_ext(src),
- 'format_id': self._type_string(src)
- }, {
- 'url': src_hq,
- 'ext': self._guess_ext(src_hq),
- 'format_id': self._type_string(src_hq)
- }]
+ urls = [flv_config['src'], flv_config['hq_src']]
+
+ ret_attrs['formats'] = []
+
+ for url in urls:
+ ret_attrs['formats'].append({
+ 'url': url,
+ 'ext': self._guess_ext(url),
+ 'format_id': self._type_string(url),
+ 'height': int(self._type_string(url))
+ })
else:
ret_attrs['url'] = flv_config['src']
ret_attrs['ext'] = self._guess_ext(flv_config['src'])