Skip to main content

Stealth Crawler

A headless-Chrome web crawler that discovers same-host links and optionally saves HTML, Markdown, PDF, or screenshots. Use as a library or via the stealth-crawler CLI.


Features

  • Asynchronous, headless Chrome browsing via pydoll
  • Discovers internal links starting from a root URL
  • Optional content saving:
    • HTML
    • Markdown (via html2text)
    • PDF snapshots
    • PNG screenshots
  • Rich progress bars with rich
  • Configurable URL filtering (base, exclude)
  • Pure-Python API and CLI

Installation

Install the latest stable release for everyday use:

pip install stealth-crawler

Or in an isolated environment with pipx:

pipx install stealth-crawler

Or via Poetry:

poetry add stealth-crawler

Quickstart

Command-Line

# Discover URLs only
stealth-crawler crawl https://example.com --urls-only

# Crawl and save HTML + Markdown
stealth-crawler crawl https://example.com \
  --save-html --save-md \
  --output-dir ./output

# Exclude specific paths
stealth-crawler crawl https://example.com \
  --exclude /private,/logout

Run stealth-crawler --help for full options.

Python API

import asyncio
from stealthcrawler import StealthCrawler

crawler = StealthCrawler(
    base="https://example.com",
    exclude=["/admin"],
    save_html=True,
    save_md=True,
    output_dir="export"
)
urls = asyncio.run(crawler.crawl("https://example.com"))
print(urls)

Configuration

Option CLI flag API param Default
Base URL(s) --base base start URL
Exclude paths --exclude exclude none
Save HTML --save-html save_html False
Save Markdown --save-md save_md False
URLs only --urls-only urls_only False
Output folder --output-dir output_dir ./output

Testing & Quality

  • Run tests:

    pytest
    
  • Check formatting & linting:

    black src tests
    ruff check src tests
    

Contributing

  1. Fork the repository and create a feature branch.

  2. Set up your development environment:

    python3 -m venv .venv
    source .venv/bin/activate
    pip install -e ".[dev]"
    

    Or with uv:

    uv venv .venv
    source .venv/bin/activate
    uv pip install -e ".[dev]"
    
  3. Implement your changes, add tests, run:

    black src tests
    ruff check src tests
    pytest
    
  4. Open a pull request against main.


License

This project is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). You are free to use, modify, and redistribute under the terms of the GPL. See LICENSE for full details.

Metadata

Release files for stealth-crawler 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stealth-crawler 0.9.0
File Size Uploaded Provenance
stealth_crawler-0.9.0.tar.gz 22.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for stealth-crawler 0.9.0
File Interpreter ABI Platform
stealth_crawler-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.2 kB

Release files / stealth_crawler-0.9.0.tar.gz

Download URL stealth_crawler-0.9.0.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
87d0a565bd8cef0ed5e0f174a00fba5efe613b56ee308cff6ae0215fe951b44c
BLAKE2b-256 checksum
How to use checksums
7e6bde61031fcff80ef57fef0620a3c337128d4708b04531b82346f3cf5bc28e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / stealth_crawler-0.9.0-py3-none-any.whl

Download URL stealth_crawler-0.9.0-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25c1ec7a41ea86d549f153bfe548999f5d67c07879d9a250cefb69fccfdc360c
BLAKE2b-256 checksum
How to use checksums
2130af0acf97f4dce00c8c8d05a6e5bf1f555226ee4aa724954b21580da4ffd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for stealth-crawler 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page