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:
parent
8f24329e30
commit
5545624da1
@ -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
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user