[Rte] Improve extractor
This commit is contained in:
parent
25fadd06d0
commit
0551a02b82
1 changed files with 9 additions and 4 deletions
|
@ -18,7 +18,7 @@ class RteIE(InfoExtractor):
|
||||||
'title': 'Nine News',
|
'title': 'Nine News',
|
||||||
'thumbnail': 're:^https?://.*\.jpg$',
|
'thumbnail': 're:^https?://.*\.jpg$',
|
||||||
'description': 'The One O\'Clock News followed by Weather.',
|
'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)
|
title = self._og_search_title(webpage)
|
||||||
|
|
||||||
description = self._search_regex(r'<meta name="description" content="(.*?)" />', webpage, 'description')
|
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_id = self._search_regex(r'<meta name="thumbnail" content="uri:irus:(.*?)" />', webpage, 'thumbnail')
|
||||||
thumbnail = 'http://img.rasset.ie/' + thumbnail_id + '.jpg'
|
thumbnail = 'http://img.rasset.ie/' + thumbnail_id + '.jpg'
|
||||||
|
@ -40,8 +40,13 @@ class RteIE(InfoExtractor):
|
||||||
# f4m_url = server + relative_url
|
# 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_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)
|
f4m_formats = self._extract_f4m_formats(f4m_url, video_id)
|
||||||
for f in f4m_formats:
|
f4m_formats = [{
|
||||||
del f['tbr']
|
'format_id': f['format_id'],
|
||||||
|
'url': f['url'],
|
||||||
|
'ext': 'mp4',
|
||||||
|
'width': f['width'],
|
||||||
|
'height': f['height'],
|
||||||
|
} for f in f4m_formats ]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
|
Loading…
Reference in a new issue