From 8ef84a68237ff247513bc41956d3c5a3ca10baa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 13 Nov 2018 18:06:36 +0100 Subject: [PATCH] add option to enable/disable specific downloader modules ... and write URLs with no (active) downloader to unsupported-file --- docs/configuration.rst | 9 +++++++++ gallery_dl/job.py | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 2b307ab3..84054d32 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -838,6 +838,15 @@ Description Certificate validation during file downloads. =========== ===== +downloader.*.enable +------------------- +=========== ===== +Type ``bool`` +Default ``true`` +Description Enable/Disable this downloader module. +=========== ===== + + downloader.ytdl.logging ----------------------- =========== ===== diff --git a/gallery_dl/job.py b/gallery_dl/job.py index 3859f7d5..0a8fc8bd 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -259,6 +259,7 @@ class DownloadJob(Job): downloader = self.get_downloader(scheme) if downloader: return downloader.download(url, self.pathfmt) + self._write_unsupported(url) return False def get_downloader(self, scheme): @@ -271,7 +272,7 @@ class DownloadJob(Job): pass klass = downloader.find(scheme) - if klass: + if klass and config.get(("downloader", scheme, "enable"), True): instance = klass(self.extractor, self.out) else: instance = None