aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authordinesh <dsdiscoverdinesh@gmail.com>2014-10-27 01:08:51 +0530
committerdinesh <dsdiscoverdinesh@gmail.com>2014-10-27 01:08:51 +0530
commit0551a02b82b4209422e0734150e0186210cd0723 (patch)
tree9ffb74b17a2b7a1c18b9a19b0412d74a3624ee27 /youtube_dl/extractor
parent25fadd06d078d54e30e187063d8b45fae31bed81 (diff)
[Rte] Improve extractor
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/rte.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/youtube_dl/extractor/rte.py b/youtube_dl/extractor/rte.py
index ab12bb5fd..8d4e94e55 100644
--- a/youtube_dl/extractor/rte.py
+++ b/youtube_dl/extractor/rte.py
@@ -18,7 +18,7 @@ class RteIE(InfoExtractor):
'title': 'Nine News',
'thumbnail': 're:^https?://.*\.jpg$',
'description': 'The One O\'Clock News followed by Weather.',
- 'duration': 1622963.0,
+ 'duration': 1622.963,
}
}
@@ -29,7 +29,7 @@ class RteIE(InfoExtractor):
title = self._og_search_title(webpage)
description = self._search_regex(r'<meta name="description" content="(.*?)" />', webpage, 'description')
- duration = float_or_none(self._html_search_meta('duration', webpage, 'duration'))
+ duration = float_or_none(self._html_search_meta('duration', webpage, 'duration'), 1000)
thumbnail_id = self._search_regex(r'<meta name="thumbnail" content="uri:irus:(.*?)" />', webpage, 'thumbnail')
thumbnail = 'http://img.rasset.ie/' + thumbnail_id + '.jpg'
@@ -40,8 +40,13 @@ class RteIE(InfoExtractor):
# f4m_url = server + relative_url
f4m_url = json_string['shows'][0]['media:group'][0]['rte:server'] + json_string['shows'][0]['media:group'][0]['url']
f4m_formats = self._extract_f4m_formats(f4m_url, video_id)
- for f in f4m_formats:
- del f['tbr']
+ f4m_formats = [{
+ 'format_id': f['format_id'],
+ 'url': f['url'],
+ 'ext': 'mp4',
+ 'width': f['width'],
+ 'height': f['height'],
+ } for f in f4m_formats ]
return {
'id': video_id,