Skip to content

Commit 07525af

Browse files
Merge pull request #101 from hhslepicka/fix/deprecate-headless-selenium-4.10
FIX: Deprecate headless option under ChromeOptions to comply with Selenium >=4.10.
2 parents 7ab885f + 923c0ba commit 07525af

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

botcity/web/browsers/undetected_chrome.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ def default_options(headless=False, download_folder_path=None, user_data_dir=Non
5959
chrome_options.add_argument("--disable-blink-features=AutomationControlled")
6060

6161
if headless:
62-
chrome_options.headless = True
62+
chrome_options.add_argument("--headless")
63+
chrome_options.add_argument("--headless=new")
64+
chrome_options.add_argument("--headless=chrome")
6365
chrome_options.add_argument("--disable-gpu")
6466
chrome_options.add_argument("--hide-scrollbars")
6567
chrome_options.add_argument("--mute-audio")

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ beautifulsoup4
33
numpy
44
opencv-python
55
pillow
6-
selenium>=4.6.1,<5
6+
selenium>=4.10,<5
77
undetected-chromedriver
88
packaging

0 commit comments

Comments
 (0)