aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M. <dstftw@gmail.com>2014-02-26 17:49:49 +0700
committerSergey M. <dstftw@gmail.com>2014-02-26 17:49:49 +0700
commit33f1f2c455a26e74347b3c0bfc76134bb5cca3df (patch)
treea789ccac9e1eb05018ae9f7671ab23103b867b87 /youtube_dl/extractor
parent995befe0e9b2a829b7aa4aeab76b4a44979c2061 (diff)
[rtlnow] Fix duration extraction
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/rtlnow.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/rtlnow.py b/youtube_dl/extractor/rtlnow.py
index 76a9704fd..6ad402c28 100644
--- a/youtube_dl/extractor/rtlnow.py
+++ b/youtube_dl/extractor/rtlnow.py
@@ -123,14 +123,16 @@ class RTLnowIE(InfoExtractor):
upload_date = unified_strdate(self._html_search_meta('uploadDate', webpage, 'upload date'))
+ mobj = re.search(r'<meta itemprop="duration" content="PT(?P<seconds>\d+)S" />', webpage)
+ duration = int(mobj.group('seconds')) if mobj else None
+
playerdata_url = self._html_search_regex(
r"'playerdata': '(?P<playerdata_url>[^']+)'", webpage, 'playerdata_url')
playerdata = self._download_xml(playerdata_url, video_id, 'Downloading player data XML')
videoinfo = playerdata.find('./playlist/videoinfo')
- duration = parse_duration(videoinfo.find('duration').text)
-
+
formats = []
for filename in videoinfo.findall('filename'):
mobj = re.search(r'(?P<url>rtmpe://(?:[^/]+/){2})(?P<play_path>.+)', filename.text)