drission 0.5.1

Rust 反检测浏览器自动化与身份治理引擎:账号池指纹准入/漂移/lifecycle 审计,内置 ddddocr OCR 与滑块缺口识别,默认 Chrome/CDP、可选 Camoufox、Cloudflare 过盾、高并发爬虫与 XHR 监听拦截。Anti-detect browser automation and browser identity governance in Rust.
Documentation
from drission_sidecar import asset, failed, profile_dir, succeeded


def main():
    current = asset() or {}

    # Replace this branch with the existing Python browser/business logic.
    if current.get("label") == "rate-limited-demo":
        failed(
            "rate_limited",
            "platform returned rate limit",
            cooldown_seconds=900,
            next_state="repair",
        )
        raise SystemExit(1)

    succeeded(
        "published",
        result={
            "accountId": current.get("accountId"),
            "profileDir": profile_dir(),
        },
    )


if __name__ == "__main__":
    main()