change config-path for 'retries' and 'timeout'
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
{
|
||||
"file": "/tmp/.gallery-dl.cache"
|
||||
},
|
||||
"downloader":
|
||||
{
|
||||
"http":
|
||||
{
|
||||
"retries": 5,
|
||||
"timeout": null
|
||||
}
|
||||
},
|
||||
"extractor":
|
||||
{
|
||||
"pixiv":
|
||||
|
||||
@@ -28,5 +28,5 @@ class BasicDownloader():
|
||||
except (OSError, AttributeError):
|
||||
pass
|
||||
|
||||
def download_impl(self, url, file_handle):
|
||||
def download_impl(self, url, pathfmt):
|
||||
"""Actual implementaion of the download process"""
|
||||
|
||||
@@ -18,12 +18,13 @@ from .. import config
|
||||
|
||||
class Downloader(BasicDownloader):
|
||||
|
||||
max_tries = config.interpolate(("downloader", "http", "retries",), 5)
|
||||
timeout = config.interpolate(("downloader", "http", "timeout",), None)
|
||||
|
||||
def __init__(self, output):
|
||||
BasicDownloader.__init__(self)
|
||||
self.session = requests.session()
|
||||
self.out = output
|
||||
self.max_tries = config.get(("retries",), 5)
|
||||
self.timeout = config.get(("timeout",), None)
|
||||
|
||||
def download_impl(self, url, pathfmt):
|
||||
tries = 0
|
||||
|
||||
Reference in New Issue
Block a user