mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-02-21 12:39:18 +00:00
[ie/niconico] Fix m3u8 formats extraction (#11103)
Some checks failed
Download Tests / Quick Download Tests (push) Waiting to run
Download Tests / Full Download Tests (ubuntu-latest, 3.10) (push) Waiting to run
Download Tests / Full Download Tests (ubuntu-latest, 3.11) (push) Waiting to run
Download Tests / Full Download Tests (ubuntu-latest, 3.12) (push) Waiting to run
Download Tests / Full Download Tests (ubuntu-latest, pypy-3.10) (push) Waiting to run
Download Tests / Full Download Tests (ubuntu-latest, pypy-3.8) (push) Waiting to run
Download Tests / Full Download Tests (windows-latest, 3.8) (push) Waiting to run
Download Tests / Full Download Tests (windows-latest, pypy-3.9) (push) Waiting to run
Quick Test / Core Test (push) Waiting to run
Quick Test / Code check (push) Waiting to run
Release (master) / release (push) Waiting to run
CodeQL / Analyze (python) (push) Has been cancelled
Some checks failed
Download Tests / Quick Download Tests (push) Waiting to run
Download Tests / Full Download Tests (ubuntu-latest, 3.10) (push) Waiting to run
Download Tests / Full Download Tests (ubuntu-latest, 3.11) (push) Waiting to run
Download Tests / Full Download Tests (ubuntu-latest, 3.12) (push) Waiting to run
Download Tests / Full Download Tests (ubuntu-latest, pypy-3.10) (push) Waiting to run
Download Tests / Full Download Tests (ubuntu-latest, pypy-3.8) (push) Waiting to run
Download Tests / Full Download Tests (windows-latest, 3.8) (push) Waiting to run
Download Tests / Full Download Tests (windows-latest, pypy-3.9) (push) Waiting to run
Quick Test / Core Test (push) Waiting to run
Quick Test / Code check (push) Waiting to run
Release (master) / release (push) Waiting to run
CodeQL / Analyze (python) (push) Has been cancelled
Closes #10724 Authored by: bashonly
This commit is contained in:
parent
1d84b780cf
commit
eabb4680fd
@ -420,7 +420,7 @@ def _yield_dms_formats(self, api_data, video_id):
|
|||||||
'x-request-with': 'https://www.nicovideo.jp',
|
'x-request-with': 'https://www.nicovideo.jp',
|
||||||
})['data']['contentUrl']
|
})['data']['contentUrl']
|
||||||
# Getting all audio formats results in duplicate video formats which we filter out later
|
# Getting all audio formats results in duplicate video formats which we filter out later
|
||||||
dms_fmts = self._extract_m3u8_formats(dms_m3u8_url, video_id)
|
dms_fmts = self._extract_m3u8_formats(dms_m3u8_url, video_id, 'mp4')
|
||||||
|
|
||||||
# m3u8 extraction does not provide audio bitrates, so extract from the API data and fix
|
# m3u8 extraction does not provide audio bitrates, so extract from the API data and fix
|
||||||
for audio_fmt in traverse_obj(dms_fmts, lambda _, v: v['vcodec'] == 'none'):
|
for audio_fmt in traverse_obj(dms_fmts, lambda _, v: v['vcodec'] == 'none'):
|
||||||
@ -432,7 +432,6 @@ def _yield_dms_formats(self, api_data, video_id):
|
|||||||
'asr': ('samplingRate', {int_or_none}),
|
'asr': ('samplingRate', {int_or_none}),
|
||||||
}), get_all=False),
|
}), get_all=False),
|
||||||
'acodec': 'aac',
|
'acodec': 'aac',
|
||||||
'ext': 'm4a',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sort before removing dupes to keep the format dicts with the lowest tbr
|
# Sort before removing dupes to keep the format dicts with the lowest tbr
|
||||||
|
Loading…
Reference in New Issue
Block a user