Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion computers/playwright/playwright.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,17 @@ def __enter__(self):
print("Creating session...")
self._playwright = sync_playwright().start()
self._browser = self._playwright.chromium.launch(
args=["--disable-blink-features=AutomationControlled"],
args=[
"--disable-blink-features=AutomationControlled",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this setting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This args is used to reduce the chance of anti-bot detection. If we remove it, we may suffer more anti-bot tasks. I would recommend to keep it.

"--disable-extensions",
"--disable-file-system",
"--disable-plugins",
"--disable-dev-shm-usage",
"--disable-background-networking",
"--disable-default-apps",
"--disable-sync",
# No '--no-sandbox' arg means the sandbox is on.
],
headless=bool(os.environ.get("PLAYWRIGHT_HEADLESS", False)),
)
self._context = self._browser.new_context(
Expand Down