A fast broken link scanner for websites
Project description
Shodh
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 shodh
CLI Usage
# Basic scan
shodh https://example.com
# Custom output file
shodh https://example.com -o report.csv
# Custom timeout (seconds)
shodh https://example.com --timeout 10
# Quiet mode (minimal output)
shodh https://example.com -q
# Show help
shodh --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
Release history Release notifications | RSS feed
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.1.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
shodh-0.1.1-py3-none-any.whl
(7.7 kB
view details)
File details
Details for the file shodh-0.1.1.tar.gz.
File metadata
- Download URL: shodh-0.1.1.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e10a3021e9ad8c28f5d96f04ec230bf1e3fa97253f2b59b1ffe0762011fd7a1
|
|
| MD5 |
d6737c57a67df596e88b9f219b4d1f47
|
|
| BLAKE2b-256 |
0208f8ffbce6550f8ae2816c32d1bc2602f2a9fe34e7cb4913f70ab48c9d93d0
|
File details
Details for the file shodh-0.1.1-py3-none-any.whl.
File metadata
- Download URL: shodh-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
189d7846023a12c73144626f03fef171044621e739ed3557ecb9b88c553d893a
|
|
| MD5 |
cdea34895318f561177ac83bfb88a8ca
|
|
| BLAKE2b-256 |
8f9a52d6147beea0a428b37fbc60de403df7e72f176fc701baed978fb682dbf5
|