diff --git a/gallery_dl/downloader/__init__.py b/gallery_dl/downloader/__init__.py index 7b9a14d0..105e5b35 100644 --- a/gallery_dl/downloader/__init__.py +++ b/gallery_dl/downloader/__init__.py @@ -20,7 +20,7 @@ def find(scheme): try: if "." not in scheme: # prevent relative imports module = importlib.import_module("." + scheme, __package__) - klass = module.Downloader + klass = module.__downloader__ except (ImportError, AttributeError, TypeError): pass _cache[scheme] = klass diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index 47fc65ac..961c1a23 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -15,7 +15,7 @@ from .common import DownloaderBase from .. import text, exception -class Downloader(DownloaderBase): +class HttpDownloader(DownloaderBase): scheme = "http" def __init__(self, extractor, output): @@ -123,3 +123,6 @@ MIMETYPE_MAP = { "application/ogg": "ogg", "application/octet-stream": "bin", } + + +__downloader__ = HttpDownloader diff --git a/gallery_dl/downloader/text.py b/gallery_dl/downloader/text.py index cf6ec5a2..ca338630 100644 --- a/gallery_dl/downloader/text.py +++ b/gallery_dl/downloader/text.py @@ -11,7 +11,7 @@ from .common import DownloaderBase -class Downloader(DownloaderBase): +class TextDownloader(DownloaderBase): scheme = "text" def __init__(self, extractor, output): @@ -32,3 +32,6 @@ class Downloader(DownloaderBase): @staticmethod def get_extension(): return "txt" + + +__downloader__ = TextDownloader diff --git a/gallery_dl/downloader/ytdl.py b/gallery_dl/downloader/ytdl.py index 76cccd04..702a34b0 100644 --- a/gallery_dl/downloader/ytdl.py +++ b/gallery_dl/downloader/ytdl.py @@ -14,7 +14,7 @@ from .. import text import os -class Downloader(DownloaderBase): +class YoutubeDLDownloader(DownloaderBase): scheme = "ytdl" def __init__(self, extractor, output): @@ -70,3 +70,6 @@ class Downloader(DownloaderBase): for entry in info_dict["entries"]: self.ytdl.process_info(entry) return True + + +__downloader__ = YoutubeDLDownloader