An aiohttp/httpx-shaped async HTTP client backed by a single, persistent, stealth-patched Chromium instance via Playwright. get/post/put/patch/ delete/head/download use context.request (real Chrome TLS/HTTP2 fingerprint, no tab needed); render()/screenshot()/page() escalate to full JS-executing page rendering for targets that need a JS challenge solved. Supports named sessions for cookie persistence/warm-up, and `async with stealth as page` to claim a tab directly, task-safe for concurrent use on one shared instance. Context/browser recycling bounds cookie and on-disk cache growth in a long-lived process. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0116i7dYLNZTXNR7Lqf439bV
33 lines
565 B
Makefile
33 lines
565 B
Makefile
.PHONY: install dev test test-unit lint format clean build uninstall
|
|
|
|
install:
|
|
pip install -e ".[test]"
|
|
playwright install chromium
|
|
|
|
dev:
|
|
pip install -e ".[test]"
|
|
playwright install chromium
|
|
|
|
test: test-unit
|
|
|
|
test-unit:
|
|
pytest tests/ -v -m 'not online'
|
|
|
|
test-integration:
|
|
pytest tests/ -v -m online
|
|
|
|
lint:
|
|
ruff check stealthii tests
|
|
|
|
format:
|
|
ruff format stealthii tests
|
|
|
|
clean:
|
|
rm -rf __pycache__ *.egg-info dist build .eggs stealthii/__pycache__ tests/__pycache__ .pytest_cache .ruff_cache
|
|
|
|
build:
|
|
python -m build
|
|
|
|
uninstall:
|
|
pip uninstall -y stealthii
|