aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/rte.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/extractor/rte.py')
-rw-r--r--youtube_dl/extractor/rte.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/youtube_dl/extractor/rte.py b/youtube_dl/extractor/rte.py
index c17ef2cc2..47c8331fe 100644
--- a/youtube_dl/extractor/rte.py
+++ b/youtube_dl/extractor/rte.py
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
float_or_none,
+ parse_iso8601,
unescapeHTML,
)
@@ -69,10 +70,12 @@ class RteRadioIE(InfoExtractor):
'url': 'http://www.rte.ie/radio/utils/radioplayer/rteradioweb.html#!rii=16:10507902:2414:27-12-2015:',
'info_dict': {
'id': '10507902',
- 'ext': 'flv',
+ 'ext': 'mp4',
'title': 'Gloria',
'thumbnail': 're:^https?://.*\.jpg$',
- 'description': 'Tim Thurston guides you through a millennium of sacred music featuring Gregorian chant, pure solo voices and choral masterpieces, framed around the glorious music of J.S. Bach.',
+ 'description': 'md5:9ce124a7fb41559ec68f06387cabddf0',
+ 'timestamp': 1451203200,
+ 'upload_date': '20151227',
'duration': 7230.0,
},
'params': {
@@ -82,8 +85,10 @@ class RteRadioIE(InfoExtractor):
def _real_extract(self, url):
item_id = self._match_id(url)
- feeds_url = 'http://www.rte.ie/rteavgen/getplaylist/?type=web&format=json&id=' + item_id
- json_string = self._download_json(feeds_url, item_id)
+
+ json_string = self._download_json(
+ 'http://www.rte.ie/rteavgen/getplaylist/?type=web&format=json&id=' + item_id,
+ item_id)
# NB the string values in the JSON are stored using XML escaping(!)
show = json_string['shows'][0]
@@ -91,6 +96,7 @@ class RteRadioIE(InfoExtractor):
description = unescapeHTML(show.get('description'))
thumbnail = show.get('thumbnail')
duration = float_or_none(show.get('duration'), 1000)
+ timestamp = parse_iso8601(show.get('published'))
mg = show['media:group'][0]
@@ -114,8 +120,9 @@ class RteRadioIE(InfoExtractor):
return {
'id': item_id,
'title': title,
- 'formats': formats,
'description': description,
'thumbnail': thumbnail,
+ 'timestamp': timestamp,
'duration': duration,
+ 'formats': formats,
}