mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 07:36:52 +01:00
[extractor/common] Add manifest_url for hls and hds formats
This commit is contained in:
parent
86f4d14f81
commit
30d0b549be
@ -1150,6 +1150,7 @@ def _parse_f4m_formats(self, manifest, manifest_url, video_id, preference=None,
|
|||||||
formats.append({
|
formats.append({
|
||||||
'format_id': format_id,
|
'format_id': format_id,
|
||||||
'url': manifest_url,
|
'url': manifest_url,
|
||||||
|
'manifest_url': manifest_url,
|
||||||
'ext': 'flv' if bootstrap_info is not None else None,
|
'ext': 'flv' if bootstrap_info is not None else None,
|
||||||
'tbr': tbr,
|
'tbr': tbr,
|
||||||
'width': width,
|
'width': width,
|
||||||
@ -1255,9 +1256,11 @@ def _extract_m3u8_formats(self, m3u8_url, video_id, ext=None,
|
|||||||
# format_id intact.
|
# format_id intact.
|
||||||
if not live:
|
if not live:
|
||||||
format_id.append(stream_name if stream_name else '%d' % (tbr if tbr else len(formats)))
|
format_id.append(stream_name if stream_name else '%d' % (tbr if tbr else len(formats)))
|
||||||
|
manifest_url = format_url(line.strip())
|
||||||
f = {
|
f = {
|
||||||
'format_id': '-'.join(format_id),
|
'format_id': '-'.join(format_id),
|
||||||
'url': format_url(line.strip()),
|
'url': manifest_url,
|
||||||
|
'manifest_url': manifest_url,
|
||||||
'tbr': tbr,
|
'tbr': tbr,
|
||||||
'ext': ext,
|
'ext': ext,
|
||||||
'fps': float_or_none(last_info.get('FRAME-RATE')),
|
'fps': float_or_none(last_info.get('FRAME-RATE')),
|
||||||
|
Loading…
Reference in New Issue
Block a user