mirror of https://github.com/yt-dlp/yt-dlp.git
[ie/nuum] Fix formats extraction (#10316)
Pass referer header to m3u8 requests Closes #10310 Authored by: DmitryScaletta
This commit is contained in:
parent
4f5d7be3c5
commit
aefede2556
|
@ -43,15 +43,17 @@ class NuumBaseIE(InfoExtractor):
|
||||||
is_live = media.get('media_status') == 'RUNNING'
|
is_live = media.get('media_status') == 'RUNNING'
|
||||||
|
|
||||||
formats, subtitles = None, None
|
formats, subtitles = None, None
|
||||||
|
headers = {'Referer': 'https://nuum.ru/'}
|
||||||
if extract_formats:
|
if extract_formats:
|
||||||
formats, subtitles = self._extract_m3u8_formats_and_subtitles(
|
formats, subtitles = self._extract_m3u8_formats_and_subtitles(
|
||||||
media_url, video_id, 'mp4', live=is_live)
|
media_url, video_id, 'mp4', live=is_live, headers=headers)
|
||||||
|
|
||||||
return filter_dict({
|
return filter_dict({
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'is_live': is_live,
|
'is_live': is_live,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'subtitles': subtitles,
|
'subtitles': subtitles,
|
||||||
|
'http_headers': headers,
|
||||||
**traverse_obj(container, {
|
**traverse_obj(container, {
|
||||||
'title': ('media_container_name', {str}),
|
'title': ('media_container_name', {str}),
|
||||||
'description': ('media_container_description', {str}),
|
'description': ('media_container_description', {str}),
|
||||||
|
@ -78,7 +80,7 @@ class NuumMediaIE(NuumBaseIE):
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://nuum.ru/videos/1567547-toxi-hurtz',
|
'url': 'https://nuum.ru/videos/1567547-toxi-hurtz',
|
||||||
'md5': 'f1d9118a30403e32b702a204eb03aca3',
|
'md5': 'ce28837a5bbffe6952d7bfd3d39811b0',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '1567547',
|
'id': '1567547',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
|
|
Loading…
Reference in New Issue