1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-21 18:22:30 +01:00

use seperate session in http downloader

This commit is contained in:
Mike Fährmann 2015-04-10 19:19:12 +02:00
parent 8f24329e30
commit 5545624da1
3 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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