From 57bf4ce6d06db4b235ed6f88105776f25d1409a2 Mon Sep 17 00:00:00 2001 From: Itay Brandes Date: Sat, 14 Dec 2013 10:43:32 +0200 Subject: [PATCH] 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 --- youtube_dl/YoutubeDL.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index c77777ba0..b5ab7281d 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -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."""