diff options
| author | Philipp Hagemeister <phihag@phihag.de> | 2013-11-28 05:47:20 +0100 | 
|---|---|---|
| committer | Philipp Hagemeister <phihag@phihag.de> | 2013-11-28 05:47:20 +0100 | 
| commit | a2e6db365c11d8c9eaaaeb8de53d59add648f978 (patch) | |
| tree | 7e44c67a4c77f375416a363d3aa5a43e4072fbfa | |
| parent | 9d93e7da6c23151272a91fbc2889c098e3b5f139 (diff) | |
[zdf] add a pseudo-testcase and fix URL matching
| -rw-r--r-- | youtube_dl/extractor/zdf.py | 16 | 
1 files changed, 15 insertions, 1 deletions
diff --git a/youtube_dl/extractor/zdf.py b/youtube_dl/extractor/zdf.py index 07f830e80..3c01cc041 100644 --- a/youtube_dl/extractor/zdf.py +++ b/youtube_dl/extractor/zdf.py @@ -1,3 +1,5 @@ +# coding: utf-8 +  import operator  import re @@ -9,7 +11,19 @@ from ..utils import (  class ZDFIE(InfoExtractor): -    _VALID_URL = r'^http://www\.zdf\.de\/ZDFmediathek(?P<hash>#)?\/(.*beitrag\/video\/)(?P<video_id>[^/\?]+)(?:\?.*)?' +    _VALID_URL = r'^https?://www\.zdf\.de/ZDFmediathek(?P<hash>#)?/(.*beitrag/(?:video/)?)(?P<video_id>[0-9]+)(?:/[^/?]+)?(?:\?.*)?' + +    _TEST = { +        u"url": u"http://www.zdf.de/ZDFmediathek/beitrag/video/2037704/ZDFspezial---Ende-des-Machtpokers--?bc=sts;stt", +        u"file": u"2037704.webm", +        u"info_dict": { +            u"upload_date": u"20131127", +            u"description": u"Union und SPD haben sich auf einen Koalitionsvertrag geeinigt. Aber was bedeutet das für die Bürger? Sehen Sie hierzu das ZDFspezial \"Ende des Machtpokers - Große Koalition für Deutschland\".", +            u"uploader": u"spezial", +            u"title": u"ZDFspezial - Ende des Machtpokers" +        }, +        u"skip": u"Videos on ZDF.de are depublicised in short order", +    }      def _real_extract(self, url):          mobj = re.match(self._VALID_URL, url)  | 
