Add proxy support to browser2
This commit is contained in:
parent
0fe6358f59
commit
cafd6c8f05
1 changed files with 3 additions and 1 deletions
|
|
@ -121,9 +121,11 @@ class BaseBrowser(object):
|
|||
TIMEOUT = 10.0
|
||||
REFRESH_MAX = 0.0
|
||||
|
||||
def __init__(self, logger=None):
|
||||
def __init__(self, logger=None, proxy=None):
|
||||
self.logger = getLogger('browser', logger)
|
||||
self._setup_session(self.PROFILE)
|
||||
if proxy is not None:
|
||||
self.session.proxies = {'http': proxy, 'https': proxy}
|
||||
self.url = None
|
||||
self.response = None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue