martinkeith700/ruyiJS
DataRuns a target site's own JavaScript in a windowless Firefox engine from Python, for scraping and reverse engineering.
ruyiJS is worth a look if you scrape sites whose data or tokens only appear after their own JavaScript runs, and you want to avoid driving a full headless browser. Its scope is narrow and Windows-only, so treat the first version as an experiment in your own pipeline.
The problem
When a site computes a signature, fills its page with JavaScript, or asks for a token before an API call, a plain HTTP request returns HTML that is missing everything you need. The usual next step is launching headless Chrome through Playwright, which means shipping a browser-sized process and spending time automating page interaction just to reach one function. In ruyiJS the flow changes: you load the HTML into a Python Context, let the page's scripts run in a Firefox JavaScript environment, then call the site's signer from Python and get the token back. The result is the value you wanted without scripted clicking through a rendered page.
What's different
The design choice is to embed only the parts of Firefox that matter for script execution: the SpiderMonkey engine (README says Firefox 158), the Necko networking stack, and a set of Web API surfaces including DOM, Canvas, Workers and iframes. In-page fetch/XHR use Necko over HTTP/1.1, 2 or 3, with a proxy you can scope to each context. A fingerprint profile lets you set navigator, screen, viewport, timezone and locale before the first script runs, and put_resource() can replay captured responses offline while net_log() records requests.
The practical benefit is a script-first workflow: eval calls keep state, and live JS objects can come back as callable JSObject/JSFunction wrappers. The trade-off is equally clear: there is no browser window and no full page layout or rendering. Sites whose challenge depends on visual layout, real rendering or GPU behavior are outside what this environment reproduces, even with its broad API list.
Who should try it
A good fit is a data engineer or JS reverse engineer who already has a captured HTML page or payload and wants to execute a specific site script from Python while controlling the network and environment. It is also reasonable for replaying a captured flow offline with stored resources. A poor fit is anyone who needs screenshots, layout-dependent interactions, or a cross-platform browser substitute. The README lists Windows x64 only, so a Linux or macOS scraping pipeline cannot use the packaged wheel as documented. Anyone whose challenge depends on rendering should also look elsewhere rather than assume the Web API surface is enough.
Requirements and limitations
Setup is a single pip install, and the README says the wheel contains a SHA256-pinned SpiderMonkey + Necko runtime, with local scripts running offline and no browser download project instructions. The hard boundary is platform: Windows x64 only, per the scope section, which rules out the package for most server fleets unless Windows hosts are already part of the plan. Since there is no layout or rendering, selectors over rendered pages and visual CAPTCHAs are not solved by this environment.
Ongoing upkeep deserves attention. The licence is MPL 2.0, but the README adds a courtesy request to obtain the author's permission for redistribution and commercial use license note. That is an author's request rather than a standard MPL term, and it is worth clarifying before shipping the library in a product. A related project, ruyiHttp, covers Requests-style HTTP on Firefox networking components if you only need the network layer related project.
HotRepo's take
The only dated observation in HotRepo's coverage is a NEW-REPOSITORY board #3 for C++ on 2026-10-27, with 132 total stars; that is a new-project ranking, not a daily trending rank or a growth measurement project page. With a single recorded date and no comparable daily-board history, persistence cannot yet be judged. Before adopting it, verify the Windows x64 requirement and the commercial-use permission note against your deployment plan; the current evidence does not support treating it as a drop-in replacement for an existing headless-browser pipeline.
Written by AI from the project's README, updated October 27, 2026. The project's own docs are the source of truth.