aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/rte.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-04-05 22:23:20 +0600
committerSergey M․ <dstftw@gmail.com>2016-04-05 22:23:20 +0600
commite42f413716de822918356d15b0cb3c66608681b5 (patch)
tree904b38ec5e76b120e8bb992ac72023b99ee007e2 /youtube_dl/extractor/rte.py
parent40a056d85d7711e2f93bd5f7cc057672650386b8 (diff)
[rte] Improve thumbnail extraction (Closes #9085)
Diffstat (limited to 'youtube_dl/extractor/rte.py')
-rw-r--r--youtube_dl/extractor/rte.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/youtube_dl/extractor/rte.py b/youtube_dl/extractor/rte.py
index 9c89974e7..ebe563ebb 100644
--- a/youtube_dl/extractor/rte.py
+++ b/youtube_dl/extractor/rte.py
@@ -39,9 +39,14 @@ class RteIE(InfoExtractor):
duration = float_or_none(self._html_search_meta(
'duration', webpage, 'duration', fatal=False), 1000)
- thumbnail_id = self._search_regex(
- r'<meta name="thumbnail" content="uri:irus:(.*?)" />', webpage, 'thumbnail')
- thumbnail = 'http://img.rasset.ie/' + thumbnail_id + '.jpg'
+ thumbnail = None
+ thumbnail_meta = self._html_search_meta('thumbnail', webpage)
+ 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
json_string = self._download_json(feeds_url, video_id)