diff options
author | Philipp Hagemeister <[email protected]> | 2013-11-25 13:19:59 -0800 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2013-11-25 13:19:59 -0800 |
commit | b0b9eaa19616da56c1d6a3ac152b31ade5ac1189 (patch) | |
tree | f4be11dce132c7b66af1bc768e23a0ea44adb5fd | |
parent | 8b134b106251cae4b8cf478fc2466c6976ae8e51 (diff) | |
parent | a3927cf7eefd2318cdfb44cdb213b3810ea7627b (diff) | |
download | youtube-dl-b0b9eaa19616da56c1d6a3ac152b31ade5ac1189.tar.gz youtube-dl-b0b9eaa19616da56c1d6a3ac152b31ade5ac1189.zip |
Merge pull request #1829 from jaimeMF/ydl-empty-params
Allow to initialize a YoutubeDL object without parameters
-rw-r--r-- | youtube_dl/YoutubeDL.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 50f750593..d0aab1bbd 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -146,7 +146,7 @@ class YoutubeDL(object): _num_downloads = None _screen_file = None - def __init__(self, params): + def __init__(self, params={}): """Create a FileDownloader object with the given options.""" self._ies = [] self._ies_instances = {} @@ -169,7 +169,7 @@ class YoutubeDL(object): self.params = params self.fd = FileDownloader(self, self.params) - if '%(stitle)s' in self.params['outtmpl']: + if '%(stitle)s' in self.params.get('outtmpl', ''): self.report_warning(u'%(stitle)s is deprecated. Use the %(title)s and the --restrict-filenames flag(which also secures %(uploader)s et al) instead.') self._setup_opener() |