aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-10-28 12:54:29 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-10-28 12:54:29 +0100
commit3511266bc39976a926a9f33a0762aa40212431ee (patch)
treeb9d4291042a12097ff6e1ecd23d4766644b0da0d /youtube_dl/YoutubeDL.py
parent9fdece5d340f24ab3c16770f71fd26943f4996c2 (diff)
[YoutubeDL] Simplify API of YoutubeDL
Calling add_default_extractors twice should be harmless since the first set of extractors will match.
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 28dcc0195..fd775b9fd 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -189,7 +189,7 @@ class YoutubeDL(object):
_num_downloads = None
_screen_file = None
- def __init__(self, params=None):
+ def __init__(self, params=None, auto_init=True):
"""Create a FileDownloader object with the given options."""
if params is None:
params = {}
@@ -246,6 +246,10 @@ class YoutubeDL(object):
self._setup_opener()
+ if auto_init:
+ self.print_debug_header()
+ self.add_default_info_extractors()
+
def add_info_extractor(self, ie):
"""Add an InfoExtractor object to the end of the list."""
self._ies.append(ie)