Repository navigation
Home
Run any site's JavaScript from Python — with the real Firefox engine.
在 Python 里跑任意站点的 JavaScript —— 用真正的 Firefox 引擎。
ruyiJS (repository ff-ruyijs, PyPI package ruyijs) is a headless Firefox engine for Python. Each Context is an isolated process in which the genuine SpiderMonkey engine (Firefox 159) runs a page's scripts against a real DOM and 38 bounded browser subsystems, while in-page fetch/XHR go out over Firefox's Necko network stack. There is no window, no layout and no renderer. The PyPI wheel is Windows x64 only; macOS arm64 is a source build or a wheel from the maintainer's fork release; Linux is not supported.
ruyiJS(仓库 ff-ruyijs,PyPI 包名 ruyijs)是给 Python 用的无头 Firefox 引擎。每个 Context 都是一个独立进程:原生 SpiderMonkey 引擎(Firefox 159)针对真实 DOM 和 38 个受限浏览器子系统运行页面脚本,页面内的 fetch/XHR 走 Firefox 的 Necko 网络栈。没有窗口、没有布局、没有渲染器。PyPI 上的 wheel 只支持 Windows x64;macOS arm64 需要源码构建,或使用维护者 fork Release 上的 wheel;Linux 尚未支持。
from ruyijs import Context
with Context() as context:
context.eval("let count = 40")
print(context.eval("count += 2")) # 42
print(context.eval("navigator.userAgent"))Disclaimer: for research into next-generation AI browsers only; any unlawful use is strictly prohibited. Use it in line with each site's terms of service and applicable law.
声明: 仅用于研究新一代 AI 浏览器,严禁用于任何非法用途。请遵守目标站点的服务条款与适用法律。
-
Installation — requirements,
pip install, what the wheel bundles, macOS - Quick Start — eval, the Python bridge, pages, navigation, the event loop
-
API Reference —
Contextand every public method, exceptions, value types - Fingerprint and Environment — profiles, clock, trusted input, replay
- Network and TLS — Necko, proxies, Firefox 100–159 TLS profiles, offline resources, cookies
- Examples — the Akamai, DataDome and CreepJS examples
-
Build from Source — Windows
tools/build.py, macOS arm64 - FAQ — common questions and troubleshooting
- Contributing and License — PR checklist, AGPL-3.0 or commercial license, contact
-
安装 — 系统要求、
pip install、wheel 内置内容、macOS - 快速开始 — eval、Python 互通、加载页面、导航、事件循环
-
API 参考 —
Context及全部公开方法、异常、值类型 - 指纹与环境 — profile、时钟、可信输入、回放
- 网络与 TLS — Necko、代理、Firefox 100–159 TLS 配置、离线资源、Cookie
- 示例 — Akamai、DataDome、CreepJS 三个示例
-
从源码构建 — Windows
tools/build.py、macOS arm64 - 常见问题 — 常见问题与故障排查
- 贡献与许可 — PR 清单、AGPL-3.0 或商业授权、联系方式
ruyiJS · GitHub · PyPI · LinuxDO · License: AGPL-3.0-only or commercial