Browse Source

Detect malformed output template

rtmp_test
Ricardo Garcia 17 years ago
committed by Ricardo Garcia
parent
commit
14c300687e
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      youtube-dl

+ 3
- 3
youtube-dl View File

@ -173,7 +173,7 @@ class FileDownloader(object):
for result in results: for result in results:
try: try:
filename = self._params['outtmpl'] % result filename = self._params['outtmpl'] % result
except (KeyError), err:
except (ValueError, KeyError), err:
self.to_stderr('ERROR: invalid output template: %s' % str(err)) self.to_stderr('ERROR: invalid output template: %s' % str(err))
continue continue
try: try:
@ -443,9 +443,9 @@ if __name__ == '__main__':
'username': None, 'username': None,
'password': None, 'password': None,
'quiet': False, 'quiet': False,
'simulate': True,
'simulate': False,
'format': None, 'format': None,
'outtmpl': '%(id)s.%(ext)s'
'outtmpl': '%(ext)s/%(ext)s/%(id)s.%(ext)s'
}) })
fd.add_info_extractor(youtube_ie) fd.add_info_extractor(youtube_ie)
fd.download([ fd.download([


Loading…
Cancel
Save