mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-04 07:01:51 +09:00
지금 일단 업데이트만 해뒀어요
This commit is contained in:
parent
09a91f9c7c
commit
e1ae2dc94f
9 changed files with 713 additions and 173 deletions
35
lib/browser_config.py.disabled
Normal file
35
lib/browser_config.py.disabled
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
from browser_use.browser.context import BrowserContextConfig
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
from typing import Any
|
||||
|
||||
def browser_config_kwargs(lang: str = "en_US") -> dict[str, Any]:
|
||||
browser_config_kwargs: dict[str, Any] = {
|
||||
"keep_alive": True,
|
||||
"browser_type": "chromium",
|
||||
"headless": False,
|
||||
"disable_security": True,
|
||||
"extra_browser_args": [
|
||||
"--disable-web-security",
|
||||
"--disable-features=VizDisplayCompositor",
|
||||
"--disable-site-isolation-trials",
|
||||
"--disable-features=IsolateOrigins,site-per-process",
|
||||
"--disable-popup-blocking",
|
||||
"--disable-dev-shm-usage",
|
||||
f"--lang={lang}",
|
||||
"--ignore-certificate-errors",
|
||||
"--ignore-ssl-errors",
|
||||
"--allow-running-insecure-content"
|
||||
],
|
||||
}
|
||||
|
||||
proxy_host = os.getenv("PROXY_HOST")
|
||||
proxy_port = os.getenv("PROXY_PORT")
|
||||
if proxy_host and proxy_port:
|
||||
browser_config_kwargs["extra_browser_args"].append(
|
||||
f"--proxy-server=http={proxy_host}:{proxy_port};https={proxy_host}:{proxy_port}"
|
||||
)
|
||||
|
||||
return browser_config_kwargs
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue