From 49e91bcb735b43a292fed7c571fa872e32152d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 5 Oct 2015 17:52:50 +0200 Subject: [PATCH] adjust loader to new config-interface --- gallery_dl/download.py | 5 ++--- gallery_dl/extractor/__init__.py | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gallery_dl/download.py b/gallery_dl/download.py index b8d1d078..1292cbe7 100644 --- a/gallery_dl/download.py +++ b/gallery_dl/download.py @@ -9,9 +9,8 @@ import os import sys import importlib -from . import extractor +from . import config, extractor from .extractor.common import Message -from . import config class DownloadManager(): @@ -43,7 +42,7 @@ class DownloadJob(): def __init__(self, mngr, url): self.mngr = mngr - self.extractor, self.info = extractor.find(url, mngr.config) + self.extractor, self.info = extractor.find(url) if self.extractor is None: return self.directory = mngr.get_base_directory() diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index d2086806..c8e41161 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -11,7 +11,7 @@ import importlib modules = [ "pixiv", - "exhentai", + # "exhentai", "gelbooru", "3dbooru", "4chan", @@ -28,12 +28,12 @@ modules = [ "yandere", ] -def find(url, config): +def find(url): """Find extractor suitable for handling the given url""" for pattern, module, klass in _list_patterns(): match = re.match(pattern, url) if match: - return klass(match, config), module.info + return klass(match), module.info # -------------------------------------------------------------------- # internals