mirror of
https://github.com/CloakHQ/CloakBrowser.git
synced 2026-06-23 11:41:46 +02:00
Python: add async counterpart to launch_context(). Forwards all kwargs to browser.new_context() — enables storage_state, permissions, extra_http_headers, etc. without needing a persistent profile folder. JS: launchContext() and launchPersistentContext() silently dropped unknown options. New contextOptions field in LaunchContextOptions is spread into newContext() to forward arbitrary Playwright context options (e.g. storageState, permissions, geolocation).
52 lines
1.6 KiB
Python
52 lines
1.6 KiB
Python
"""cloakbrowser — Stealth Chromium that passes every bot detection test.
|
|
|
|
Drop-in Playwright replacement with source-level fingerprint patches.
|
|
|
|
Usage:
|
|
from cloakbrowser import launch
|
|
|
|
browser = launch()
|
|
page = browser.new_page()
|
|
page.goto("https://protected-site.com")
|
|
browser.close()
|
|
"""
|
|
|
|
from .browser import launch, launch_async, launch_context, launch_context_async, launch_persistent_context, launch_persistent_context_async, ProxySettings, build_args, maybe_resolve_geoip
|
|
from .config import CHROMIUM_VERSION, get_default_stealth_args
|
|
from .download import binary_info, check_for_update, clear_cache, ensure_binary
|
|
from ._version import __version__
|
|
|
|
# Human-like behavioral layer (optional)
|
|
def __getattr__(name):
|
|
if name == "HumanConfig":
|
|
from .human.config import HumanConfig
|
|
globals()["HumanConfig"] = HumanConfig
|
|
return HumanConfig
|
|
if name == "resolve_human_config":
|
|
from .human.config import resolve_config
|
|
globals()["resolve_human_config"] = resolve_config
|
|
return resolve_config
|
|
raise AttributeError(f"module 'cloakbrowser' has no attribute {name}")
|
|
|
|
__all__ = [
|
|
"launch",
|
|
"launch_async",
|
|
"launch_context",
|
|
"launch_context_async",
|
|
"launch_persistent_context",
|
|
"launch_persistent_context_async",
|
|
"ensure_binary",
|
|
"clear_cache",
|
|
"binary_info",
|
|
"check_for_update",
|
|
"CHROMIUM_VERSION",
|
|
"get_default_stealth_args",
|
|
"build_args",
|
|
"maybe_resolve_geoip",
|
|
"ProxySettings",
|
|
"HumanConfig",
|
|
"resolve_human_config",
|
|
"__version__",
|
|
]
|
|
|