mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-07-11 16:04:36 +02:00
cleanup
Authored by: bashonly
This commit is contained in:
parent
c43e839118
commit
074a232a8c
|
@ -110,6 +110,7 @@ def _real_extract(self, url):
|
||||||
'Referer': url,
|
'Referer': url,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# HLS extraction is fatal; only attempt it if the JSON data says it's available
|
||||||
if traverse_obj(data, 'hls'):
|
if traverse_obj(data, 'hls'):
|
||||||
manifest_query = self._policy_to_qs(data, 'm')
|
manifest_query = self._policy_to_qs(data, 'm')
|
||||||
fragment_query = self._policy_to_qs(data, 't', as_string=True)
|
fragment_query = self._policy_to_qs(data, 't', as_string=True)
|
||||||
|
@ -127,7 +128,7 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
if downloads := traverse_obj(data, ('downloads', {dict.items}, lambda _, v: url_or_none(v[1]))):
|
if downloads := traverse_obj(data, ('downloads', {dict.items}, lambda _, v: url_or_none(v[1]))):
|
||||||
quality = qualities(self._QUALITIES)
|
quality = qualities(self._QUALITIES)
|
||||||
acodec = 'none' if traverse_obj(data, 'has_audio') is False else None
|
acodec = 'none' if data.get('has_audio') is False else None
|
||||||
formats.extend([{
|
formats.extend([{
|
||||||
'format_id': str(format_id),
|
'format_id': str(format_id),
|
||||||
'url': format_url,
|
'url': format_url,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user