new API in BaseBackend to create browser
This commit is contained in:
parent
2b93eec3c9
commit
c1279aa496
12 changed files with 84 additions and 87 deletions
|
|
@ -148,7 +148,12 @@ class BaseBrowser(mechanize.Browser):
|
|||
|
||||
# Use a proxy
|
||||
if proxy:
|
||||
self.set_proxies({"http": proxy})
|
||||
proto = 'http'
|
||||
if proxy.find('://') >= 0:
|
||||
proto, domain = proxy.split('://', 1)
|
||||
else:
|
||||
domain = proxy
|
||||
self.set_proxies({proto: domain})
|
||||
|
||||
# Share cookies with firefox
|
||||
if firefox_cookies and HAVE_COOKIES:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue