aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>2008-07-22 09:21:43 +0200
committerRicardo Garcia <devnull@localhost>2008-07-22 09:21:43 +0200
commit14c300687e4a2724fb458676cd2b0214acb9647a (patch)
tree620d4e6189490856e161a24850c552b43e4429f9
parent7e5cab673024e93a706afa64f9fc38e25e8df085 (diff)
downloadyoutube-dl-14c300687e4a2724fb458676cd2b0214acb9647a.tar.xz
Detect malformed output template
-rwxr-xr-xyoutube-dl6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube-dl b/youtube-dl
index 1c4a05471..d3f277110 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -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([