summaryrefslogtreecommitdiffstats
path: root/gallery_dl/downloader/common.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2022-03-15 00:19:57 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2022-03-15 00:19:57 -0400
commitc2e774d3f5a4499b8beb5a12ab46a0099b16b1e7 (patch)
treea14107397b5bcb491aa4f4fb3e0feb4582e1879b /gallery_dl/downloader/common.py
parent7900ee4e3692dbd8056c3e47c81bb22eda030b65 (diff)
New upstream version 1.21.0.upstream/1.21.0
Diffstat (limited to 'gallery_dl/downloader/common.py')
-rw-r--r--gallery_dl/downloader/common.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/gallery_dl/downloader/common.py b/gallery_dl/downloader/common.py
index d858075..1168d83 100644
--- a/gallery_dl/downloader/common.py
+++ b/gallery_dl/downloader/common.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2014-2020 Mike Fährmann
+# Copyright 2014-2022 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
@@ -27,6 +27,12 @@ class DownloaderBase():
self.partdir = util.expand_path(self.partdir)
os.makedirs(self.partdir, exist_ok=True)
+ proxies = self.config("proxy", util.SENTINEL)
+ if proxies is util.SENTINEL:
+ self.proxies = job.extractor._proxies
+ else:
+ self.proxies = util.build_proxy_map(proxies, self.log)
+
def config(self, key, default=None):
"""Interpolate downloader config value for 'key'"""
return config.interpolate(("downloader", self.scheme), key, default)