add option to enable/disable specific downloader modules

... and write URLs with no (active) downloader to unsupported-file
pull/133/head
Mike Fährmann 6 years ago
parent 14ee6bf611
commit 8ef84a6823
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -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
-----------------------
=========== =====

@ -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

Loading…
Cancel
Save