Skip to main content

A fast broken link scanner for websites

Project description

Grawl

A fast, simple CLI tool and library to detect 404 pages on your website.

Built for developers who want quick broken-link checks without heavy dependencies.

Features

  • Fast crawling powered by selectolax
  • Detects 404 pages and reports broken links
  • Skips URL fragments (#section)
  • Exports results to CSV
  • Simple CLI and programmatic API
  • Type hints throughout

Installation

pip install grawl

CLI Usage

# Basic scan
grawl https://example.com

# Custom output file
grawl https://example.com -o report.csv

# Custom timeout (seconds)
grawl https://example.com --timeout 10

# Quiet mode (minimal output)
grawl https://example.com -q

# Show help
grawl --help

Programmatic API

import grawl

# Basic scan
report = grawl.scan("https://example.com")

print(f"Scanned {report.total_scanned} pages")
print(f"Found {len(report.broken_links)} broken links")

# Access results
for result in report.broken_links:
    print(f"404: {result.url}")

# With options
report = grawl.scan(
    "https://example.com",
    timeout=10,
    quiet=True,
)

# Export to CSV
grawl.export_csv(report, "broken_links.csv")

# Callback for real-time results
def on_result(result):
    if result.is_broken:
        print(f"Found broken link: {result.url}")

report = grawl.scan("https://example.com", on_result=on_result)

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check src tests

# Type check
mypy src

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shodh-0.1.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shodh-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file shodh-0.1.0.tar.gz.

File metadata

  • Download URL: shodh-0.1.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for shodh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 46faaae489695e62a0c53cc60a6a63a5fe6f35da6d2e9413c1ac791b36141bb5
MD5 36076ca776a912ba0ad4a3b6d4f6a375
BLAKE2b-256 33aa7959f172c92a82b58497a3c606b8aca0eab56939fdeba2759d3a5e8ad7b6

See more details on using hashes here.

File details

Details for the file shodh-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shodh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for shodh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b71f1cce93e5671ba634ebcf8bd53ef7e9b1c91ca8c900d1745fa0527e85ffa
MD5 49351a69fb8b541d192513326f221951
BLAKE2b-256 da00ed26cd1abf832a9f4c38e10b32ace0ef1858b92550a1988fe110da87f640

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page