A feature-rich command-line audio/video downloader
Allow to initialize a YoutubeDL object without parameters
Jaime Marquínez Ferrándiza3927cf7eefd
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.pyindex a1ef3a94ab..46635bce15 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 = paramsself.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()