mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-26 02:55:17 +00:00
Fix --print
with --ignore-no-formats
when url is None
(#3000)
Authored by: flashdagger
This commit is contained in:
parent
6e6beffd04
commit
10331a2672
1 changed files with 1 additions and 1 deletions
|
@ -2777,7 +2777,7 @@ def print_optional(field):
|
||||||
if info_dict.get('requested_formats') is not None:
|
if info_dict.get('requested_formats') is not None:
|
||||||
# For RTMP URLs, also include the playpath
|
# For RTMP URLs, also include the playpath
|
||||||
info_dict['urls'] = '\n'.join(f['url'] + f.get('play_path', '') for f in info_dict['requested_formats'])
|
info_dict['urls'] = '\n'.join(f['url'] + f.get('play_path', '') for f in info_dict['requested_formats'])
|
||||||
elif 'url' in info_dict:
|
elif info_dict.get('url'):
|
||||||
info_dict['urls'] = info_dict['url'] + info_dict.get('play_path', '')
|
info_dict['urls'] = info_dict['url'] + info_dict.get('play_path', '')
|
||||||
|
|
||||||
if (self.params.get('forcejson')
|
if (self.params.get('forcejson')
|
||||||
|
|
Loading…
Reference in a new issue