browser: Allow changing the Session class
In a separate method, so arguments can be removed or added.
This commit is contained in:
parent
b4a428a2c8
commit
25da89642a
1 changed files with 4 additions and 1 deletions
|
|
@ -200,11 +200,14 @@ class Browser(object):
|
||||||
else:
|
else:
|
||||||
self.logger.info(msg)
|
self.logger.info(msg)
|
||||||
|
|
||||||
|
def _create_session(self):
|
||||||
|
return FuturesSession(max_workers=self.MAX_WORKERS, max_retries=self.MAX_RETRIES)
|
||||||
|
|
||||||
def _setup_session(self, profile):
|
def _setup_session(self, profile):
|
||||||
"""
|
"""
|
||||||
Set up a python-requests session for our usage.
|
Set up a python-requests session for our usage.
|
||||||
"""
|
"""
|
||||||
session = FuturesSession(max_workers=self.MAX_WORKERS, max_retries=self.MAX_RETRIES)
|
session = self._create_session()
|
||||||
|
|
||||||
session.proxies = self.PROXIES
|
session.proxies = self.PROXIES
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue