From 3fb5a8b834c081dfe410ec6d47ac07c238e2d298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 24 Nov 2015 19:47:51 +0100 Subject: [PATCH] delay 'requests'-import --- gallery_dl/__init__.py | 2 +- gallery_dl/extractor/common.py | 11 +---------- gallery_dl/extractor/message.py | 15 +++++++++++++++ gallery_dl/jobs.py | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 gallery_dl/extractor/message.py diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 7cfcb75f..41f2d6e2 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -17,7 +17,7 @@ __email__ = "mike_faehrmann@web.de" import os import sys import argparse -from . import config, jobs +from . import config, extractor, jobs def build_cmdline_parser(): parser = argparse.ArgumentParser( diff --git a/gallery_dl/extractor/common.py b/gallery_dl/extractor/common.py index 7dc39a52..655ab742 100644 --- a/gallery_dl/extractor/common.py +++ b/gallery_dl/extractor/common.py @@ -12,18 +12,9 @@ import time import queue import requests import threading +from .message import Message from .. import config - -class Message(): - - Version = 1 - Directory = 2 - Url = 3 - Headers = 4 - Cookies = 5 - - class Extractor(): def __init__(self): diff --git a/gallery_dl/extractor/message.py b/gallery_dl/extractor/message.py new file mode 100644 index 00000000..193cd86e --- /dev/null +++ b/gallery_dl/extractor/message.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +# Copyright 2015 Mike Fährmann +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. + +class Message(): + + Version = 1 + Directory = 2 + Url = 3 + Headers = 4 + Cookies = 5 diff --git a/gallery_dl/jobs.py b/gallery_dl/jobs.py index fa7676b1..072fe561 100644 --- a/gallery_dl/jobs.py +++ b/gallery_dl/jobs.py @@ -9,7 +9,7 @@ import os import sys from . import config, extractor, downloader, text -from .extractor.common import Message +from .extractor.message import Message class DownloadJob():