From 657be7fa62986a3180ead83f5b62c2dd0d28cf23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrn=20Brodersen?= Date: Sat, 4 Jul 2015 02:03:13 +0200 Subject: [PATCH] [wdr] Update for the wdr extractor --- youtube_dl/extractor/wdr.py | 114 +++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 54 deletions(-) diff --git a/youtube_dl/extractor/wdr.py b/youtube_dl/extractor/wdr.py index b46802306..4916944ff 100644 --- a/youtube_dl/extractor/wdr.py +++ b/youtube_dl/extractor/wdr.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import itertools import re +import json from .common import InfoExtractor from ..compat import ( @@ -16,9 +17,8 @@ from ..utils import ( class WDRIE(InfoExtractor): - _PLAYER_REGEX = '-(?:video|audio)player(?:_size-[LMS])?' - _VALID_URL = r'(?Phttps?://www\d?\.(?:wdr\d?|funkhauseuropa)\.de/)(?P.+?)(?P%s)?\.html' % _PLAYER_REGEX - + _PLAYER_REGEX = 'https?://deviceids-medstdp.wdr.de/ondemand/.+?/.+?\.js' + _VALID_URL = r'(?Phttps?://www\d?\.(?:wdr\d?|funkhauseuropa)\.de/)(?P.+?)\.html' _TESTS = [ { 'url': 'http://www1.wdr.de/mediathek/video/sendungen/servicezeit/videoservicezeit560-videoplayer_size-L.html', @@ -95,80 +95,86 @@ class WDRIE(InfoExtractor): } ] + def _overiew_page_extractor(self, page_url, page_id, webpage): + entries = [] + for page_num in itertools.count(2): + hrefs = re.findall( + r'
  • \s*]*>\s*\s*\s*]*>\s*\s*\n
    \n