Skip to content

Commit 48f776a

Browse files
committed
remove deprecated things.
1 parent 727a87b commit 48f776a

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file has been auto-generated.
22
# All changes will be lost, see Projectfile.
33
#
4-
# Updated at 2017-06-11 10:33:09.983415
4+
# Updated at 2017-06-11 11:44:27.482152
55

66
PACKAGE ?= bonobo_selenium
77
PYTHON ?= $(shell which python)
@@ -14,7 +14,7 @@ PIP ?= $(PYTHON_DIRNAME)/pip
1414
PIP_INSTALL_OPTIONS ?=
1515
PYTEST ?= $(PYTHON_DIRNAME)/pytest
1616
PYTEST_OPTIONS ?= --capture=no --cov=$(PACKAGE) --cov-report html
17-
YAPF ?= $(PYTHON_DIRNAME)/yapf
17+
YAPF ?= $(PYTHON) -m yapf
1818
YAPF_OPTIONS ?= -rip
1919
VERSION ?= $(shell git describe 2>/dev/null || echo dev)
2020

bonobo_selenium/__init__.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import selenium.webdriver
22

3-
from bonobo import service
43
from bonobo._version import __version__
54

65
USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4'
@@ -24,26 +23,18 @@ def create_profile(use_tor=False):
2423

2524
def create_browser(profile):
2625
_browser = selenium.webdriver.Firefox(profile)
27-
_browser.implicitly_wait(10)
28-
_browser.set_page_load_timeout(10)
26+
# _browser.implicitly_wait(10)
27+
# _browser.set_page_load_timeout(10)
2928
return _browser
3029

31-
32-
@service
33-
def browser():
34-
return create_browser(create_profile(use_tor=False))
35-
36-
37-
@service
38-
def torbrowser():
39-
return create_browser(create_profile(use_tor=True))
30+
def create_chrome_browser():
31+
browser = selenium.webdriver.Chrome()
32+
return browser
4033

4134

4235
__all__ = [
4336
'USER_AGENT',
4437
'__version__',
45-
'browser',
4638
'create_browser',
4739
'create_profile',
48-
'torbrowser',
4940
]

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-e .[dev]
22
appdirs==1.4.3
3-
bonobo==0.4.0
3+
bonobo==0.4.1
44
certifi==2017.4.17
55
chardet==3.0.4
66
colorama==0.3.9

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-e .
22
appdirs==1.4.3
3-
bonobo==0.4.0
3+
bonobo==0.4.1
44
certifi==2017.4.17
55
chardet==3.0.4
66
colorama==0.3.9

0 commit comments

Comments
 (0)