247153575d
Tests / tests (map[TOXENV:py310], macos-latest, 3.10) (push) Has been cancelled
Tests / tests (map[TOXENV:py311], macos-latest, 3.11) (push) Has been cancelled
Tests / tests (map[TOXENV:py312], macos-latest, 3.12) (push) Has been cancelled
Tests / tests (map[TOXENV:py313], macos-latest, 3.13) (push) Has been cancelled
100 lines
3.2 KiB
Python
100 lines
3.2 KiB
Python
# Disable loading these resources for speed
|
|
EXTRA_RESOURCES = {
|
|
"font",
|
|
"image",
|
|
"media",
|
|
"beacon",
|
|
"object",
|
|
"imageset",
|
|
"texttrack",
|
|
"websocket",
|
|
"csp_report",
|
|
"stylesheet",
|
|
}
|
|
|
|
HARMFUL_ARGS = (
|
|
# This will be ignored to avoid detection more and possibly avoid the popup crashing bug abuse: https://issues.chromium.org/issues/340836884
|
|
"--enable-automation",
|
|
"--disable-popup-blocking",
|
|
"--disable-component-update",
|
|
"--disable-default-apps",
|
|
"--disable-extensions",
|
|
)
|
|
|
|
DEFAULT_ARGS = (
|
|
# Speed up chromium browsers by default
|
|
"--no-pings",
|
|
"--no-first-run",
|
|
"--disable-infobars",
|
|
"--disable-breakpad",
|
|
"--no-service-autorun",
|
|
"--homepage=about:blank",
|
|
"--password-store=basic",
|
|
"--disable-hang-monitor",
|
|
"--no-default-browser-check",
|
|
"--disable-session-crashed-bubble",
|
|
"--disable-search-engine-choice-screen",
|
|
)
|
|
|
|
STEALTH_ARGS = (
|
|
# Explanation: https://peter.sh/experiments/chromium-command-line-switches/
|
|
# Generally this will make the browser faster and less detectable
|
|
# "--incognito",
|
|
"--test-type",
|
|
"--lang=en-US",
|
|
"--mute-audio",
|
|
"--disable-sync",
|
|
"--hide-scrollbars",
|
|
"--disable-logging",
|
|
"--start-maximized", # For headless check bypass
|
|
"--enable-async-dns",
|
|
"--accept-lang=en-US",
|
|
"--use-mock-keychain",
|
|
"--disable-translate",
|
|
"--disable-voice-input",
|
|
"--window-position=0,0",
|
|
"--disable-wake-on-wifi",
|
|
"--ignore-gpu-blocklist",
|
|
"--enable-tcp-fast-open",
|
|
"--enable-web-bluetooth",
|
|
"--disable-cloud-import",
|
|
"--disable-print-preview",
|
|
"--disable-dev-shm-usage",
|
|
# '--disable-popup-blocking',
|
|
"--metrics-recording-only",
|
|
"--disable-crash-reporter",
|
|
"--disable-partial-raster",
|
|
"--disable-gesture-typing",
|
|
"--disable-checker-imaging",
|
|
"--disable-prompt-on-repost",
|
|
"--force-color-profile=srgb",
|
|
"--font-render-hinting=none",
|
|
"--aggressive-cache-discard",
|
|
"--disable-cookie-encryption",
|
|
"--disable-domain-reliability",
|
|
"--disable-threaded-animation",
|
|
"--disable-threaded-scrolling",
|
|
"--enable-simple-cache-backend",
|
|
"--disable-background-networking",
|
|
"--enable-surface-synchronization",
|
|
"--disable-image-animation-resync",
|
|
"--disable-renderer-backgrounding",
|
|
"--disable-ipc-flooding-protection",
|
|
"--prerender-from-omnibox=disabled",
|
|
"--safebrowsing-disable-auto-update",
|
|
"--disable-offer-upload-credit-cards",
|
|
"--disable-background-timer-throttling",
|
|
"--disable-new-content-rendering-timeout",
|
|
"--run-all-compositor-stages-before-draw",
|
|
"--disable-client-side-phishing-detection",
|
|
"--disable-backgrounding-occluded-windows",
|
|
"--disable-layer-tree-host-memory-pressure",
|
|
"--autoplay-policy=user-gesture-required",
|
|
"--disable-offer-store-unmasked-wallet-cards",
|
|
"--disable-blink-features=AutomationControlled",
|
|
"--disable-component-extensions-with-background-pages",
|
|
"--enable-features=NetworkService,NetworkServiceInProcess,TrustTokens,TrustTokensAlwaysAllowIssuance",
|
|
"--blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4",
|
|
"--disable-features=AudioServiceOutOfProcess,TranslateUI,BlinkGenPropertyTrees",
|
|
)
|