mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-14 04:13:20 +00:00
[theplatform] Some NBC videos require an additional cookie
Related: #9578
This commit is contained in:
parent
50ce1c331c
commit
22a0a95247
|
@ -14,11 +14,13 @@
|
||||||
compat_urllib_parse_urlparse,
|
compat_urllib_parse_urlparse,
|
||||||
)
|
)
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
|
determine_ext,
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
float_or_none,
|
float_or_none,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
sanitized_Request,
|
sanitized_Request,
|
||||||
unsmuggle_url,
|
unsmuggle_url,
|
||||||
|
update_url_query,
|
||||||
xpath_with_ns,
|
xpath_with_ns,
|
||||||
mimetype2ext,
|
mimetype2ext,
|
||||||
find_xpath_attr,
|
find_xpath_attr,
|
||||||
|
@ -48,6 +50,12 @@ def _extract_theplatform_smil(self, smil_url, video_id, note='Downloading SMIL d
|
||||||
if OnceIE.suitable(_format['url']):
|
if OnceIE.suitable(_format['url']):
|
||||||
formats.extend(self._extract_once_formats(_format['url']))
|
formats.extend(self._extract_once_formats(_format['url']))
|
||||||
else:
|
else:
|
||||||
|
media_url = _format['url']
|
||||||
|
if determine_ext(media_url) == 'm3u8':
|
||||||
|
hdnea2 = self._get_cookies(media_url).get('hdnea2')
|
||||||
|
if hdnea2:
|
||||||
|
_format['url'] = update_url_query(media_url, {'hdnea3': hdnea2.value})
|
||||||
|
|
||||||
formats.append(_format)
|
formats.append(_format)
|
||||||
|
|
||||||
subtitles = self._parse_smil_subtitles(meta, default_ns)
|
subtitles = self._parse_smil_subtitles(meta, default_ns)
|
||||||
|
|
Loading…
Reference in a new issue