From: Sergey M. Date: Wed, 26 Feb 2014 10:49:49 +0000 (+0700) Subject: [rtlnow] Fix duration extraction X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=33f1f2c455a26e74347b3c0bfc76134bb5cca3df;p=youtube-dl [rtlnow] Fix duration extraction --- 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'', webpage) + duration = int(mobj.group('seconds')) if mobj else None + playerdata_url = self._html_search_regex( r"'playerdata': '(?P[^']+)'", 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'(?Prtmpe://(?:[^/]+/){2})(?P.+)', filename.text)