Skip to content

Commit 1e4a7ec

Browse files
committed
Replace exception when using chrome and having explicit executable_path by debug log
1 parent e360ccb commit 1e4a7ec

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/crawlee/browsers/_playwright_browser_plugin.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ def __init__(
8383
'chromium_sandbox': not config.disable_browser_sandbox,
8484
}
8585

86-
if browser_type == 'chrome' and default_launch_browser_options['executable_path']:
87-
raise ValueError(
88-
'Cannot use browser_type `chrome` with `Configuration.default_browser_path` or `executable_path` set.'
89-
)
90-
9186
# Map 'chrome' to 'chromium' with the 'chrome' channel.
9287
if browser_type == 'chrome':
9388
browser_type = 'chromium'
9489
# Chromium parameter 'channel' set to 'chrome' enables using installed Google Chrome.
9590
default_launch_browser_options['channel'] = 'chrome'
91+
if default_launch_browser_options['executable_path']:
92+
logger.debug(
93+
f'Using browser executable from {default_launch_browser_options["executable_path"]},'
94+
f" which takes precedence over 'chrome' channel."
95+
)
9696

9797
self._browser_type: BrowserType = browser_type
9898
self._browser_launch_options: dict[str, Any] = default_launch_browser_options | (browser_launch_options or {})

0 commit comments

Comments
 (0)