Skip to content

kurom1ii/kuromi-browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kuromi Browser 🦊

Stealthy Python browser automation library combining the best of Browser-Use (AI/LLM) and DrissionPage (dual-mode) with CDP stealth & fingerprint bypass.

Python 3.10+ License: MIT

✨ Features

  • Dual Mode: Browser (CDP) + Session (HTTP) in one API
  • AI-Powered: Optional LLM integration for intelligent automation
  • Stealth Mode: Built-in anti-detection & fingerprint spoofing
  • Simple API: DrissionPage-style syntax for ease of use
  • Async-First: Native async/await support
  • Event-Driven: Extensible watchdog system
  • Proxy Support: HTTP, HTTPS, SOCKS4, SOCKS5 with authentication
  • MCP Server: Model Context Protocol for AI agent integration

πŸš€ Quick Start

Simple Mode (like DrissionPage)

from kuromi_browser import Page

page = Page()
page.get('https://example.com')
page.ele('#button').click()
print(page.ele('.content').text)

Stealth Mode

from kuromi_browser import StealthPage

page = StealthPage()  # Auto fingerprint + CDP patches
page.get('https://protected-site.com')

AI Mode (like Browser-Use)

from kuromi_browser import Agent
from kuromi_browser.llm import OpenAI

agent = Agent(llm=OpenAI())
result = await agent.run("Search for Python tutorials on Google")
print(result)

Dual Mode

from kuromi_browser import HybridPage

page = HybridPage()
# Fast HTTP requests
data = page.session.get('https://api.example.com/data').json()
# Browser for complex interactions
page.browser.get('https://example.com')
page.browser.ele('#submit').click()

Proxy Support (HTTP, HTTPS, SOCKS4, SOCKS5)

from kuromi_browser import Browser, BrowserConfig, ProxyConfig

# Simple proxy URL
config = BrowserConfig(proxy="http://proxy.example.com:8080")

# SOCKS5 with authentication
config = BrowserConfig(proxy="socks5://user:pass@127.0.0.1:1080")

# ProxyConfig for more control
proxy = ProxyConfig.from_url("socks5://user:pass@socks.example.com:1080")
print(proxy.proxy_type)  # ProxyType.SOCKS5
print(proxy.to_chromium_arg())  # socks5://socks.example.com:1080

# Use in session mode
from kuromi_browser.session import Session
session = Session(proxy="http://user:pass@proxy.com:8080")

MCP Server (for AI Agents)

# Run as MCP server for Claude, GPT, etc.
python -m kuromi_browser.mcp

# Or integrate programmatically
from kuromi_browser.mcp import BrowserMCPServer
server = BrowserMCPServer()
await server.start()

MCP config example (~/.config/claude/claude_desktop_config.json):

{
  "mcpServers": {
    "kuromi-browser": {
      "command": "python",
      "args": ["-m", "kuromi_browser.mcp"]
    }
  }
}

πŸ“¦ Installation

pip install kuromi-browser

πŸ—οΈ Architecture

kuromi_browser/
β”œβ”€β”€ cdp/           # CDP client & browser management
β”œβ”€β”€ dom/           # Element locators & DOM service
β”œβ”€β”€ session/       # HTTP mode with TLS impersonation
β”œβ”€β”€ events/        # Event bus system
β”œβ”€β”€ watchdogs/     # Monitoring services
β”œβ”€β”€ llm/           # LLM provider integrations
β”œβ”€β”€ agent/         # AI agent system
β”œβ”€β”€ stealth/       # Anti-detection & fingerprint
β”‚   β”œβ”€β”€ cdp/       # CDP patches
β”‚   β”œβ”€β”€ fingerprint/  # Fingerprint generator
β”‚   β”œβ”€β”€ behavior/  # Human-like actions
β”‚   └── tls/       # TLS/JA3 impersonation
β”œβ”€β”€ network/       # Network monitoring
└── mcp/           # Model Context Protocol server

πŸ›‘οΈ Anti-Detection Features

CDP Stealth

  • Patch navigator.webdriver
  • Hide automation traces
  • Sandbox page agent code

Fingerprint Spoofing

  • Navigator properties
  • WebGL/Canvas/Audio
  • Screen/Viewport
  • Market share distribution (via BrowserForge)

TLS Impersonation

  • JA3 fingerprint matching
  • Browser TLS profiles (Chrome, Firefox, Safari)
  • HTTP/2 fingerprint

Human-like Behavior

  • Bezier curve mouse movement
  • Natural typing patterns
  • Realistic scroll behavior

πŸ“š Documentation

English

Tieng Viet

πŸ”— References

This project is inspired by and references:

Python

JavaScript

πŸ“„ License

MIT License - see LICENSE for details.


Made with ❀️ by Kuromi

About

🦊 Stealthy Python browser automation library combining Browser-Use (AI/LLM) + DrissionPage (dual-mode) with CDP stealth & fingerprint bypass

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages