mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-03 14:39:56 +08:00
feat(browser): migrate to CloakBrowser for browser emulation and streamline dependency management
- Replace Playwright-based browser emulation with CloakBrowser as default - Update config to support CloakBrowser options and humanization presets - Refactor browser helper to use CloakBrowser context and remove cf_clearance dependency - Update Dockerfile, entrypoint, and update scripts to install CloakBrowser runtime - Ensure CloakBrowser kernel is pre-installed during local setup and dependency updates - Add tests for CloakBrowser integration and legacy compatibility
This commit is contained in:
@@ -2653,9 +2653,18 @@ def install_deps(*, python_bin: str, venv_dir: Path, recreate: bool) -> Path:
|
||||
|
||||
print_step("安装项目依赖")
|
||||
run([str(venv_pip), "install", "-r", str(ROOT / "requirements.txt")])
|
||||
install_browser_runtime(venv_python)
|
||||
return venv_python
|
||||
|
||||
|
||||
def install_browser_runtime(venv_python: Path) -> None:
|
||||
"""
|
||||
预下载 CloakBrowser 浏览器内核,避免首次仿真登录时才拉取大文件。
|
||||
"""
|
||||
print_step("安装 CloakBrowser 浏览器内核")
|
||||
run([str(venv_python), "-m", "cloakbrowser", "install"])
|
||||
|
||||
|
||||
def _startup_platform_name() -> str:
|
||||
system = platform.system()
|
||||
if system == "Darwin":
|
||||
|
||||
Reference in New Issue
Block a user