]> asedeno.scripts.mit.edu Git - youtube-dl.git/commitdiff
Detect malformed output template
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>
Tue, 22 Jul 2008 07:21:43 +0000 (09:21 +0200)
committerRicardo Garcia <devnull@localhost>
Tue, 22 Jul 2008 07:21:43 +0000 (09:21 +0200)
youtube-dl

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