Skip to main content

YSbrowser SDK 0.11.1

配套 YSbrowser 定制浏览器的 Windows Python SDK,支持同步/异步调用、Context 配置、代理、状态保存和模型鼠标操作。

安装

pip install ysbrowser-sdk
python -m ysbrowser_sdk install

Python >= 3.10;依赖 Patchright 1.64.2、NumPy 和 ONNX Runtime。默认下载内置的 YSBrowser 6.2;需要其他版本时,可用 --url 显式指定压缩包直链。浏览器默认安装到当前目录的 ./browsers,下载压缩包在解压完成后删除。推理不需要 PyTorch。

使用

from ysbrowser_sdk.sync_api import YSBrowser

with YSBrowser(headless=False) as browser:
    context = browser.new_context()
    page = context.new_page()
    page.set_content('<button style="position:absolute;left:700px;top:300px">目标</button>')
    mouse = context.mouse(page)
    result = mouse.move_between(100, 200, 500, 300)
    result = mouse.click_element(page.get_by_role("button", name="目标"))
    print(result.plan.model_id, result.plan.data_source)

异步代码从 ysbrowser_sdk.async_api 导入,在浏览器操作前加 await。

鼠标使用随包条件 Flow Matching Transformer。move()、move_to() 为绝对坐标,move_by() 为相对距离,move_between() 指定起终点。省略 duration_s 自动预测运动时长。原生 page.mouse 和 Locator 保持原生调用方式,模型操作通过 context.mouse(page) 使用。

Metadata

Release files for ysbrowser-sdk 0.11.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ysbrowser-sdk 0.11.1
File Size Uploaded Provenance Actions
ysbrowser_sdk-0.11.1.tar.gz 16.5 MB Without provenance Details for ysbrowser_sdk-0.11.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ysbrowser-sdk 0.11.1
File Interpreter ABI Platform Actions
ysbrowser_sdk-0.11.1-py3-none-any.whl Python 3 none any Details for ysbrowser_sdk-0.11.1-py3-none-any.whl

Total release size: 32.1 MB

Release files / ysbrowser_sdk-0.11.1.tar.gz

Download URL ysbrowser_sdk-0.11.1.tar.gz
Size 16.5 MB
Tags Source
SHA-256 checksum
How to use checksums
dd56a945e0910c3dc5aebb324fe7ee46bcc83ecee8cce0b458fd2a4295f2198c
BLAKE2b-256 checksum
How to use checksums
d18ecddd464835f4dd2588ad9d939f83f98d2fb1ead8e2950d548a3d07bc87fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / ysbrowser_sdk-0.11.1-py3-none-any.whl

Download URL ysbrowser_sdk-0.11.1-py3-none-any.whl
Size 15.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
de7a399d3685495ed76d21071d33f7c9ca7e419a1431bca3ba68a091453fae9b
BLAKE2b-256 checksum
How to use checksums
cdb35ffaa57f04ee64a44ecbc64726336bf4c77ac47671278ff8c632fe7a0d88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for ysbrowser-sdk 0.11.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page