mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-24 15:50:32 +01:00
[extractor/nbc] Fix XML parsing
Python 3.7 compat bug in cb73b8460c
Authored by: bashonly
This commit is contained in:
parent
5ab3534d44
commit
176a068cde
@ -3,7 +3,7 @@
|
||||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from .theplatform import ThePlatformIE
|
||||
from .theplatform import ThePlatformIE, default_ns
|
||||
from .adobepass import AdobePassIE
|
||||
from ..compat import compat_urllib_parse_unquote
|
||||
from ..utils import (
|
||||
@ -700,7 +700,7 @@ def _real_extract(self, url):
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
|
||||
nbc_data = self._search_json(
|
||||
r'<script>var\s*nbc\s*=', webpage, 'NBC JSON data', video_id)
|
||||
r'<script>\s*var\s+nbc\s*=', webpage, 'NBC JSON data', video_id)
|
||||
pdk_acct = nbc_data.get('pdkAcct') or 'Yh1nAC'
|
||||
fw_ssid = traverse_obj(nbc_data, ('video', 'fwSSID'))
|
||||
|
||||
@ -771,8 +771,8 @@ def _real_extract(self, url):
|
||||
f'https://link.theplatform.com/s/{pdk_acct}/{player_id}', video_id,
|
||||
note='Downloading SMIL data', query=query, fatal=is_live)
|
||||
if smil:
|
||||
manifest_url = xpath_attr(smil, './/{*}video', 'src', fatal=is_live)
|
||||
subtitles = self._parse_smil_subtitles(smil, '*')
|
||||
manifest_url = xpath_attr(smil, f'.//{{{default_ns}}}video', 'src', fatal=is_live)
|
||||
subtitles = self._parse_smil_subtitles(smil, default_ns)
|
||||
fmts, subs = self._extract_m3u8_formats_and_subtitles(
|
||||
manifest_url, video_id, 'mp4', m3u8_id='hls', fatal=is_live,
|
||||
live=is_live, errnote='No HLS formats found')
|
||||
|
Loading…
Reference in New Issue
Block a user