Browse Source

Let extractors omit ext in formats

rtmp_test
Philipp Hagemeister 11 years ago
parent
commit
c1002e96e9
2 changed files with 3 additions and 1 deletions
  1. +3
    -0
      youtube_dl/YoutubeDL.py
  2. +0
    -1
      youtube_dl/extractor/addanime.py

+ 3
- 0
youtube_dl/YoutubeDL.py View File

@ -484,6 +484,9 @@ class YoutubeDL(object):
res=self.format_resolution(format),
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):
self.list_formats(info_dict)


+ 0
- 1
youtube_dl/extractor/addanime.py View File

@ -71,7 +71,6 @@ class AddAnimeIE(InfoExtractor):
formats.append({
'format_id': format_id,
'url': video_url,
'ext': video_url[-3:],
})
if not formats:
raise ExtractorError(u'Cannot find any video format!')


Loading…
Cancel
Save