diff options
author | Alexander Seiler <seileralex@gmail.com> | 2018-11-20 20:50:40 +0100 |
---|---|---|
committer | Sergey M <dstftw@gmail.com> | 2018-11-21 02:50:40 +0700 |
commit | 15ed5a27840e748d9f786c50b78a4c6326e9f186 (patch) | |
tree | 6691722b7993c043a51d499d9d710e03769fd01a /youtube_dl | |
parent | 2e1280ed432257244ea52a47efe6a7f0e226b897 (diff) |
[nzz] Relax kaltura regex
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/nzz.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/youtube_dl/extractor/nzz.py b/youtube_dl/extractor/nzz.py index 2d352f53f..61ee77adb 100644 --- a/youtube_dl/extractor/nzz.py +++ b/youtube_dl/extractor/nzz.py @@ -11,20 +11,27 @@ from ..utils import ( class NZZIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?nzz\.ch/(?:[^/]+/)*[^/?#]+-ld\.(?P<id>\d+)' - _TEST = { + _TESTS = [{ 'url': 'http://www.nzz.ch/zuerich/gymizyte/gymizyte-schreiben-schueler-heute-noch-diktate-ld.9153', 'info_dict': { 'id': '9153', }, 'playlist_mincount': 6, - } + }, { + 'url': 'https://www.nzz.ch/video/nzz-standpunkte/cvp-auf-der-suche-nach-dem-mass-der-mitte-ld.1368112', + 'info_dict': { + 'id': '1368112', + }, + 'playlist_count': 1, + }] def _real_extract(self, url): page_id = self._match_id(url) webpage = self._download_webpage(url, page_id) entries = [] - for player_element in re.findall(r'(<[^>]+class="kalturaPlayer"[^>]*>)', webpage): + for player_element in re.findall( + r'(<[^>]+class="kalturaPlayer[^"]*"[^>]*>)', webpage): player_params = extract_attributes(player_element) if player_params.get('data-type') not in ('kaltura_singleArticle',): self.report_warning('Unsupported player type') |