Skip to content

Commit

Permalink
Merge pull request #97 from kaliiiiiiiiii/dev
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
kaliiiiiiiiii authored Aug 19, 2023
2 parents 9888ece + 0a57cb7 commit c97ef51
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ profile = \
### selenium-driverless
warning:
- this package is experimental and might include bugs, please report them at [bug-reports](https://github.com/kaliiiiiiiiii/Selenium-Driverless/issues)
- might only work with 64-bit Python installations
- profiles might make it detected
- requires `pip install selenium-driverless>=1.3.4` first
```python
from selenium_profiles.webdriver import Chrome
from selenium_profiles.profiles import profiles
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ selenium-interceptor
undetected-chromedriver
selenium-wire
webdriver-manager
selenium-injector>=2.3
selenium-injector

# google-colab
# PyVirtualDisplay
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

requirements = ['selenium', 'requests', 'selenium-interceptor',
"undetected-chromedriver", "selenium-wire", "webdriver-manager",
"selenium-injector>=2.3","selenium-driverless>=1.2.2"]
"selenium-injector>=2.3"]

if 'google.colab' in sys.modules: # we're on google-colab
requirements.extend(['PyVirtualDisplay', "google-colab-shell"])
Expand Down
2 changes: 1 addition & 1 deletion src/selenium_profiles/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.2.9"
__version__ = "2.2.10"
6 changes: 4 additions & 2 deletions src/selenium_profiles/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ def __init__(self, profile: dict = None, chrome_binary: str = None, executable_p
injector_options:dict or bool or None = None, driverless_options = None,
**kwargs):

import seleniumwire.undetected_chromedriver as wire_uc_webdriver

import undetected_chromedriver as uc_webdriver
import seleniumwire.undetected_chromedriver as wire_uc_webdriver
from seleniumwire import webdriver as wire_webdriver


from selenium_profiles.utils.utils import valid_key

if not base_drivers:
Expand Down Expand Up @@ -168,7 +170,7 @@ def __init__(self, profile: dict = None, chrome_binary: str = None, executable_p

self.profiles.cdp_handler.apply(cdp_profile=profile["cdp"])

if not uc_driver:
if not (uc_driver or driverless_options):
from selenium_profiles.scripts import undetected
undetected.exec_cdp(self, cdp_handler=self.profiles.cdp_handler)

Expand Down

0 comments on commit c97ef51

Please sign in to comment.