Exclude parameter for the add_default_info_extractors function

We should add an exclude parameter for the add_default_info_extractors
function, just in case we want to exclude a specific IE
This commit is contained in:
Itay Brandes 2013-12-14 10:43:32 +02:00
parent 5d574e143f
commit 57bf4ce6d0

View File

@ -218,12 +218,13 @@ class YoutubeDL(object):
self.add_info_extractor(ie)
return ie
def add_default_info_extractors(self):
def add_default_info_extractors(self, exclude=[]):
"""
Add the InfoExtractors returned by gen_extractors to the end of the list
"""
for ie in gen_extractors():
self.add_info_extractor(ie)
if not ie.__class__.__name__ in exclude:
self.add_info_extractor(ie)
def add_post_processor(self, pp):
"""Add a PostProcessor object to the end of the chain."""