Skip to content

Commit

Permalink
FIX: Deprecate headless option under ChromeOptions to comply with Sel…
Browse files Browse the repository at this point in the history
…enium >=4.10.
  • Loading branch information
hhslepicka committed Dec 1, 2023
1 parent 7ab885f commit 923c0ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion botcity/web/browsers/undetected_chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def default_options(headless=False, download_folder_path=None, user_data_dir=Non
chrome_options.add_argument("--disable-blink-features=AutomationControlled")

if headless:
chrome_options.headless = True
chrome_options.add_argument("--headless")
chrome_options.add_argument("--headless=new")
chrome_options.add_argument("--headless=chrome")
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("--hide-scrollbars")
chrome_options.add_argument("--mute-audio")
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ beautifulsoup4
numpy
opencv-python
pillow
selenium>=4.6.1,<5
selenium>=4.10,<5
undetected-chromedriver
packaging

0 comments on commit 923c0ba

Please sign in to comment.