Commit 5e45e77c authored by Romain Bignon's avatar Romain Bignon Committed by Vincent A

Module.create_browser: read _proxy_headers from config

It may contain a dict encoded with json
parent 658d30e9
......@@ -25,6 +25,7 @@ from weboob.capabilities.base import BaseObject, Capability, FieldNotFound, NotA
from weboob.exceptions import ModuleInstallError
from import basestring, getproxies
from import getLogger
from import json
from import iter_fields
from import ValuesDict
......@@ -353,6 +354,11 @@ class Module(object):
return None
kwargs['proxy'] = self.get_proxy()
if '_proxy_headers' in self._private_config:
kwargs['proxy_headers'] = self._private_config['_proxy_headers']
if isinstance(kwargs['proxy_headers'], basestring):
kwargs['proxy_headers'] = json.loads(kwargs['proxy_headers'])
kwargs['logger'] = self.logger
if self.logger.settings['responses_dirname']:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment