mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-16 18:42:38 +09:00
Let extractors omit ext in formats
This commit is contained in:
parent
77d0a82fef
commit
c1002e96e9
@ -484,6 +484,9 @@ class YoutubeDL(object):
|
|||||||
res=self.format_resolution(format),
|
res=self.format_resolution(format),
|
||||||
note=u' ({})'.format(format['format_note']) if format.get('format_note') is not None else '',
|
note=u' ({})'.format(format['format_note']) if format.get('format_note') is not None else '',
|
||||||
)
|
)
|
||||||
|
# Automatically determine file extension if missing
|
||||||
|
if 'ext' not in format:
|
||||||
|
format['ext'] = determine_ext(format['url'])
|
||||||
|
|
||||||
if self.params.get('listformats', None):
|
if self.params.get('listformats', None):
|
||||||
self.list_formats(info_dict)
|
self.list_formats(info_dict)
|
||||||
|
@ -71,7 +71,6 @@ class AddAnimeIE(InfoExtractor):
|
|||||||
formats.append({
|
formats.append({
|
||||||
'format_id': format_id,
|
'format_id': format_id,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'ext': video_url[-3:],
|
|
||||||
})
|
})
|
||||||
if not formats:
|
if not formats:
|
||||||
raise ExtractorError(u'Cannot find any video format!')
|
raise ExtractorError(u'Cannot find any video format!')
|
||||||
|
Loading…
Reference in New Issue
Block a user