mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-22 10:11:52 +00:00
[rte] Improve thumbnail extraction (Closes #9085)
This commit is contained in:
parent
40a056d85d
commit
e42f413716
1 changed files with 8 additions and 3 deletions
|
@ -39,9 +39,14 @@ class RteIE(InfoExtractor):
|
||||||
duration = float_or_none(self._html_search_meta(
|
duration = float_or_none(self._html_search_meta(
|
||||||
'duration', webpage, 'duration', fatal=False), 1000)
|
'duration', webpage, 'duration', fatal=False), 1000)
|
||||||
|
|
||||||
thumbnail_id = self._search_regex(
|
thumbnail = None
|
||||||
r'<meta name="thumbnail" content="uri:irus:(.*?)" />', webpage, 'thumbnail')
|
thumbnail_meta = self._html_search_meta('thumbnail', webpage)
|
||||||
thumbnail = 'http://img.rasset.ie/' + thumbnail_id + '.jpg'
|
if thumbnail_meta:
|
||||||
|
thumbnail_id = self._search_regex(
|
||||||
|
r'uri:irus:(.+)', thumbnail_meta,
|
||||||
|
'thumbnail id', fatal=False)
|
||||||
|
if thumbnail_id:
|
||||||
|
thumbnail = 'http://img.rasset.ie/%s.jpg' % thumbnail_id
|
||||||
|
|
||||||
feeds_url = self._html_search_meta('feeds-prefix', webpage, 'feeds url') + video_id
|
feeds_url = self._html_search_meta('feeds-prefix', webpage, 'feeds url') + video_id
|
||||||
json_string = self._download_json(feeds_url, video_id)
|
json_string = self._download_json(feeds_url, video_id)
|
||||||
|
|
Loading…
Reference in a new issue