Fix -F for extractors that directly return url

Related: #693
This commit is contained in:
pukkandan 2021-08-14 01:51:47 +05:30
parent 37242e56f2
commit 86c66b2d3e
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

View File

@ -2231,7 +2231,7 @@ class YoutubeDL(object):
if self.params.get('list_thumbnails'):
self.list_thumbnails(info_dict)
if self.params.get('listformats'):
if not info_dict.get('formats'):
if not info_dict.get('formats') and not info_dict.get('url'):
raise ExtractorError('No video formats found', expected=True)
self.list_formats(info_dict)
if self.params.get('listsubtitles'):