cutetailbud/ff-ruyijs
HEADLESS BROWSER ON SPIDERMONKEY FOR AI
Lightweight headless browser on SpiderMonkey engine (Firefox 160) and Necko network stack to run site JavaScript from Python. Designed for AI agents: scraping, bypassing protection, JS reverse engineering without window or renderer.
// KEY FEATURES
- Real SpiderMonkey 160 and Necko without window or renderer
- Isolated contexts: own process, proxy, JS world
- Works offline: replay captured flows locally
- Wheels for Windows, macOS arm64, Linux x86_64
// DEEP DIVE: HOW IT WORKS
ruyiJS embeds only the necessary Firefox components: the SpiderMonkey 160 engine and the Necko network stack. Each Context runs in a separate process with its own JavaScript world and proxy, guaranteeing session isolation. The browser creates no window, performs no layout, and renders no GPU — it is a pure JS + Web API environment for fast startup and low memory footprint.
Unlike Headless Chrome or Playwright, ruyiJS does not impersonate a browser but uses real Firefox internals. This allows executing calls, challenges, signatures, and fingerprints exactly as real Firefox would. Offline mode is supported: you can supply scripts and responses locally, replaying captured traffic without network. Licensed under AGPL-3.0; commercial use requires a separate license.
Pre-built wheels on PyPI for Python 3.10+: Windows x64 (~42 MB runtime), macOS arm64 (macOS 26+, Apple Silicon), and Linux x86_64 (glibc 2.39+, Ubuntu 24.04, Debian 13, Fedora 40+). On macOS there is no xpcshell; proxy works via HTTP CONNECT into libnecko_core. The Linux build uses fontconfig, FreeType, HarfBuzz, OpenSSL 3, and its own Python for the Necko helper. Building from source requires cloning with the Firefox 160.0 submodule.
// USE CASES
Best for: For AI engineers and scrapers to bypass protection and reverse JS
- Scrape sites with JS challenges and anti-bot protection via real Firefox engine
- Reverse-engineer site signatures and fingerprints in isolated JS environment
- Automate login and data collection behind protection by replaying captured flows offline
// QUICK START
python -m pip install ruyijsCommands are taken from the repository README — check the current version on GitHub before running.
New repositories every 30 minutes
REDDYX AI scans GitHub 24/7 and ships the best AI/ML/Web3 projects to Telegram.
Join on Telegram