Fix hls_manifest_url not included when there's no other formats
Since there are no formats, it was retrying with the non-embedded playerResponse, which resulted in the hls_manifest_urls from the embedded player_response being overwritten with None. So use conservative_update instead
This commit is contained in:
parent
aa3e5aa441
commit
803c901445
@ -340,8 +340,12 @@ def _extract_formats(info, player_response):
|
|||||||
yt_formats = streaming_data.get('formats', []) + streaming_data.get('adaptiveFormats', [])
|
yt_formats = streaming_data.get('formats', []) + streaming_data.get('adaptiveFormats', [])
|
||||||
|
|
||||||
info['formats'] = []
|
info['formats'] = []
|
||||||
info['hls_manifest_url'] = streaming_data.get('hlsManifestUrl')
|
# because we may retry the extract_formats with a different player_response
|
||||||
info['dash_manifest_url'] = streaming_data.get('dashManifestUrl')
|
# so keep what we have
|
||||||
|
conservative_update(info, 'hls_manifest_url',
|
||||||
|
streaming_data.get('hlsManifestUrl'))
|
||||||
|
conservative_update(info, 'dash_manifest_url',
|
||||||
|
streaming_data.get('dash_manifest_url'))
|
||||||
|
|
||||||
for yt_fmt in yt_formats:
|
for yt_fmt in yt_formats:
|
||||||
fmt = {}
|
fmt = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user