Skip to content

Commit 2b7ca4f

Browse files
committed
FIX: Remove headless to options drivers
1 parent 4bd12eb commit 2b7ca4f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

botcity/web/bot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ def check_driver():
266266

267267
def _get_parameters_to_driver(self):
268268
if self.browser == Browser.UNDETECTED_CHROME:
269-
return {"options": self.options, "desired_capabilities": self.capabilities, "headless": self.headless}
269+
return {"options": self.options,
270+
"desired_capabilities": self.capabilities}
270271
if compat.version_selenium_is_larger_than_four():
271272
return {"options": self.options, "service": self._get_service()}
272273

botcity/web/browsers/undetected_chrome.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ def default_options(headless=False, download_folder_path=None, user_data_dir=Non
5656
chrome_options.add_argument("--disable-blink-features=AutomationControlled")
5757

5858
if headless:
59-
chrome_options.add_argument('--headless')
60-
chrome_options.add_argument('--headless=new')
61-
chrome_options.add_argument('--headless=chrome')
59+
chrome_options.headless = True
6260
chrome_options.add_argument("--disable-gpu")
6361
chrome_options.add_argument("--hide-scrollbars")
6462
chrome_options.add_argument("--mute-audio")

0 commit comments

Comments
 (0)