mirror of https://github.com/yt-dlp/yt-dlp.git
parent
8531d2b03b
commit
1d4d9c5fd3
|
@ -1,9 +1,6 @@
|
|||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
extract_attributes,
|
||||
)
|
||||
|
||||
|
||||
class NZZIE(InfoExtractor):
|
||||
|
@ -27,14 +24,8 @@ class NZZIE(InfoExtractor):
|
|||
webpage = self._download_webpage(url, page_id)
|
||||
|
||||
entries = []
|
||||
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')
|
||||
continue
|
||||
entry_id = player_params['data-id']
|
||||
entries.append(self.url_result(
|
||||
'kaltura:1750922:' + entry_id, 'Kaltura', entry_id))
|
||||
for script in re.findall(r'(?s)<script[^>]+data-hid="jw-video-jw[^>]+>(.*?)</script>', webpage):
|
||||
settings = self._search_json(r'var\s+settings\s*=[^{]*', script, 'settings', page_id)
|
||||
entries.append(self._parse_jwplayer_data(settings))
|
||||
|
||||
return self.playlist_result(entries, page_id)
|
||||
|
|
Loading…
Reference in New Issue