invisible_selenium  by feder-cr

Stealth browser automation bypassing bot detection

Created 2 years ago
263 stars

Top 97.5% on SourcePulse

GitHubView on GitHub
Project Summary

This project addresses the challenge of web scraping and browser automation being detected and blocked by anti-bot systems. It targets engineers, researchers, and power users needing to bypass captchas and bot detection. The primary benefit is enabling robust web scraping and automation by providing a Selenium-compatible API with an undetectable browser.

How It Works

The core approach utilizes a Firefox browser patched at the C++ source level, rather than relying on JavaScript injection. This patched engine answers anti-bot queries by embedding a realistic, unique browser fingerprint directly within the browser's core, covering aspects like navigator properties, screen resolution, GPU/WebGL, canvas, fonts, audio, WebRTC, and timezone. It bypasses geckodriver and Marionette to prevent common detection vectors. Actions are humanized with natural mouse pathing and timing, and input events are processed through the browser's native path, making automation indistinguishable from human interaction.

Quick Start & Requirements

  • Primary install: pip install invisible-selenium
  • Prerequisites: Python 3.11 or newer. A one-time download of the patched Firefox engine is required via python -m invisible_selenium fetch.
  • Supported platforms: Windows x86_64 / ARM64, Linux x86_64 / arm64.
  • Links: Usage examples are provided directly in the README.

Highlighted Details

  • Maintains full compatibility with the standard Selenium API, allowing seamless switching from existing Selenium code.
  • Each session generates a distinct fingerprint from approximately 200 fields, ensuring uniqueness.
  • Supports SOCKS5, SOCKS4, HTTP, and HTTPS proxies, including DNS tunneling.
  • Offers granular control over browser fingerprinting via seed for reproducibility, pin for forcing specific fields, timezone settings, and headless mode with real rendering.
  • Persistent browser profiles can be maintained using the profile_dir option for cookies and storage.

Maintenance & Community

The project is built by Federico Elia. Related projects like invisible_playwright and invisible_puppeteer are mentioned, indicating a broader ecosystem. No specific community channels (e.g., Discord, Slack), sponsorship details, or roadmap links are provided in the README.

Licensing & Compatibility

The project is primarily licensed under MIT. Two files are under Apache-2.0, inherited from Playwright's driver. The patched Firefox binary itself uses the MPL-2.0 license. The MIT license generally permits commercial use and integration into closed-source projects.

Limitations & Caveats

This project is explicitly stated to be for "educational purposes only" and is provided "as-is, with no warranties." Users assume all responsibility for its use and compliance with applicable laws. It is not compatible with standard Selenium installations; Selenium should not be installed alongside this package.

Health Check
Last Commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
63
Issues (30d)
0
Star History
108 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.