3 from .common
import InfoExtractor
6 class NZZIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www\.)?nzz\.ch/(?:[^/]+/)*[^/?#]+-ld\.(?P<id>\d+)'
9 'url': 'http://www.nzz.ch/zuerich/gymizyte/gymizyte-schreiben-schueler-heute-noch-diktate-ld.9153',
13 'playlist_mincount': 6,
15 'url': 'https://www.nzz.ch/video/nzz-standpunkte/cvp-auf-der-suche-nach-dem-mass-der-mitte-ld.1368112',
22 def _entries(self
, webpage
, page_id
):
23 for script
in re
.findall(r
'(?s)<script[^>]* data-hid="jw-video-jw[^>]+>(.+?)</script>', webpage
):
24 settings
= self
._search
_json
(r
'var\s+settings\s*=[^{]*', script
, 'settings', page_id
, fatal
=False)
25 if entry
:= self
._parse
_jwplayer
_data
(settings
, page_id
):
28 def _real_extract(self
, url
):
29 page_id
= self
._match
_id
(url
)
30 webpage
= self
._download
_webpage
(url
, page_id
)
32 return self
.playlist_result(self
._entries
(webpage
, page_id
), page_id
)