X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Frtlnow.py;h=4835ec5ecada755a12d7003fed6355adfd6936a6;hb=a9c2896e2252839c2e4801189f10acce7ff6413e;hp=e84919aa5784fe430a7eeaa13a9782547d2e95e2;hpb=1bb92aff55abb23eb0c23aca858c2eab77cf84c5;p=youtube-dl diff --git a/youtube_dl/extractor/rtlnow.py b/youtube_dl/extractor/rtlnow.py index e84919aa5..4835ec5ec 100644 --- a/youtube_dl/extractor/rtlnow.py +++ b/youtube_dl/extractor/rtlnow.py @@ -8,7 +8,6 @@ from ..utils import ( ExtractorError, clean_html, unified_strdate, - parse_duration, int_or_none, ) @@ -92,16 +91,15 @@ class RTLnowIE(InfoExtractor): }, }, { - 'url': 'http://www.n-tvnow.de/top-gear/episode-1-2013-01-01-00-00-00.php?film_id=124903&player=1&season=10', + 'url': 'http://www.n-tvnow.de/deluxe-alles-was-spass-macht/thema-ua-luxushotel-fuer-vierbeiner.php?container_id=153819&player=1&season=0', 'info_dict': { - 'id': '124903', + 'id': '153819', 'ext': 'flv', - 'title': 'Top Gear vom 01.01.2013', - 'description': 'Episode 1', - 'upload_date': '20130101', - }, - 'params': { - 'skip_download': True, + 'title': 'Deluxe - Alles was Spaß macht - Thema u.a.: Luxushotel für Vierbeiner', + 'description': 'md5:c3705e1bb32e1a5b2bcd634fc065c631', + 'thumbnail': 'http://autoimg.static-fra.de/ntvnow/383157/1500x1500/image2.jpg', + 'upload_date': '20140221', + 'duration': 2429, }, 'skip': 'Only works from Germany', }, @@ -124,14 +122,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)