mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
Handle --get-url with merged formats (fixes #2883)
Outputs one URL per line
This commit is contained in:
parent
0ef4d4ab7e
commit
16ae61f655
|
@ -942,6 +942,10 @@ class YoutubeDL(object):
|
||||||
if self.params.get('forceid', False):
|
if self.params.get('forceid', False):
|
||||||
self.to_stdout(info_dict['id'])
|
self.to_stdout(info_dict['id'])
|
||||||
if self.params.get('forceurl', False):
|
if self.params.get('forceurl', False):
|
||||||
|
if info_dict.get('requested_formats') is not None:
|
||||||
|
for f in info_dict['requested_formats']:
|
||||||
|
self.to_stdout(f['url'] + f.get('play_path', ''))
|
||||||
|
else:
|
||||||
# For RTMP URLs, also include the playpath
|
# For RTMP URLs, also include the playpath
|
||||||
self.to_stdout(info_dict['url'] + info_dict.get('play_path', ''))
|
self.to_stdout(info_dict['url'] + info_dict.get('play_path', ''))
|
||||||
if self.params.get('forcethumbnail', False) and info_dict.get('thumbnail') is not None:
|
if self.params.get('forcethumbnail', False) and info_dict.get('thumbnail') is not None:
|
||||||
|
|
Loading…
Reference in a new issue