From 5545624da16e2fc43214ac9dbc9381e4b94acafc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 10 Apr 2015 19:19:12 +0200 Subject: [PATCH] use seperate session in http downloader --- gallery_dl/download.py | 2 +- gallery_dl/downloader/http.py | 4 ++-- gallery_dl/downloader/text.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gallery_dl/download.py b/gallery_dl/download.py index 6572d31d..16dce884 100644 --- a/gallery_dl/download.py +++ b/gallery_dl/download.py @@ -116,7 +116,7 @@ class DownloadJob(): downloader = self.downloaders.get(scheme) if downloader is None: module = self.mngr.get_downloader_module(scheme) - downloader = module.Downloader(self.extractor) + downloader = module.Downloader() self.downloaders[scheme] = downloader return downloader diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index 4423c7c4..153d6bc4 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -4,9 +4,9 @@ import requests class Downloader(BasicDownloader): - def __init__(self, extr): + def __init__(self): BasicDownloader.__init__(self) - self.session = extr.session + self.session = requests.session() def download_impl(self, url, file): tries = 0 diff --git a/gallery_dl/downloader/text.py b/gallery_dl/downloader/text.py index c8ecd935..36fa49c4 100644 --- a/gallery_dl/downloader/text.py +++ b/gallery_dl/downloader/text.py @@ -2,7 +2,7 @@ from .common import BasicDownloader class Downloader(BasicDownloader): - def __init__(self, extr): + def __init__(self): BasicDownloader.__init__(self) def download_impl(self, url, file):