Skip to main content

Crawl a website and audit SEO, accessibility, performance & broken links โ€” zero dependencies.

Project description

๐Ÿฉบ site-doctor

Crawl any website and audit SEO ยท Accessibility ยท Performance ยท Broken links โ€” from your terminal.

An agency-grade website health checker in pure Python. Get a scored report in seconds, output JSON for dashboards, or gate your CI/CD on a minimum health score.

Python Zero deps CI License


  site-doctor โ€” https://example.com
  Pages audited: 12  ยท  Links checked: 140

  Health Score: 82.4/100
  Grade: B โ€” good

  SEO            โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘  88.0/100
  Accessibility  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘  79.0/100
  Performance    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  96.0/100
  Links          โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘  88.0/100

  Top issues
  [error] a11y: 4/9 images missing an alt attribute. (7 pages)
  [warn]  seo:  Meta description is 182 chars (>160). (3 pages)
  ...
  Broken links (2)
  โœ— 404  https://example.com/old-page

๐Ÿ“– New here? Read the full User Manual (USAGE.md) โ€” install, first audit, every option, and troubleshooting (including the "command not recognized" fix).

โœจ What it checks

Category Examples
๐Ÿ” SEO title length, meta description, single H1, canonical, Open Graph, viewport, JSON-LD, thin content
โ™ฟ Accessibility <html lang>, image alt text, vague/empty link text, form-field labels, heading hierarchy
โšก Performance HTML size, script/stylesheet count, large inline JS, image count (heuristics from HTML)
๐Ÿ”— Broken links parallel HTTP checks of internal and external links, with status codes

Plus a weighted overall health score and letter grade.

๐Ÿš€ Install

pip install site-doctor

Or run from source (no install): PYTHONPATH=src python -m sitedoctor <url>

๐Ÿ•น๏ธ Usage

site-doctor example.com                  # full audit (crawls up to 20 pages)
site-doctor https://mysite.com --max-pages 50 --max-depth 3
site-doctor mysite.com --json > report.json    # machine-readable
site-doctor mysite.com --no-external           # skip external link checks (faster)
site-doctor mysite.com --fail-under 80         # exit 1 if score < 80  (great for CI)

site-doctor mysite.com --sitemap               # audit every URL in /sitemap.xml
site-doctor mysite.com --html report.html      # client-ready HTML report
site-doctor mysite.com --md report.md          # Markdown report

Options

Flag Description
--max-pages N Max pages to crawl (default 20)
--max-depth N Max crawl depth (default 2)
--max-links N Max links to check (default 200)
--timeout N Per-request timeout in seconds (default 15)
--sitemap Audit URLs from sitemap.xml instead of crawling
--sitemap-url URL Use an explicit sitemap URL (implies --sitemap)
--html PATH Also write a self-contained HTML report
--md PATH Also write a Markdown report
--no-robots Ignore robots.txt (it's respected by default)
--no-external Don't check external links
--fail-under N Exit non-zero if health score < N
--json / --no-color JSON output / plain text
--no-banner Hide the PGLU banner

๐Ÿค– Gate your deploys on site health (GitHub Actions)

- name: Audit site health
  run: |
    pip install site-doctor
    site-doctor https://your-site.com --fail-under 80

The build fails if SEO/a11y/performance/links regress below your threshold.

๐Ÿงฑ How it works

Pure standard library: a breadth-first crawler (urllib), an html.parser-based extractor, pure-function check rules, weighted scoring, and a ThreadPoolExecutor-powered parallel link checker. No browser, no third-party packages.

crawler โ†’ parser โ†’ checks (seo/a11y/perf) โ†’ scoring โ†’ report โ†’ render
                                  links checker โ†—

๐Ÿ“ฆ Publishing (maintainers)

Publishing to PyPI is a manual action via publish.yml using Trusted Publishing (no API tokens). One-time setup on pypi.org: Your account โ†’ Publishing โ†’ Add a pending publisher with project site-doctor, owner aashishbharti04, repo site-doctor, workflow publish.yml, environment pypi. Then run the workflow from the Actions tab.

๐Ÿ› ๏ธ Develop

pip install -e ".[dev]"
pytest -q

๐Ÿค Contributing

New checks, output formats, or fixes are welcome โ€” see CONTRIBUTING.md.

๐Ÿ“„ License

MIT ยฉ Aashish Bharti

โญ Star it if site-doctor saved you a manual audit.

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

site_doctor-0.1.1.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

site_doctor-0.1.1-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file site_doctor-0.1.1.tar.gz.

File metadata

  • Download URL: site_doctor-0.1.1.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for site_doctor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f60740754381d55c05cb11fb339661987f6576ea1398d6a6379713716bd0cd39
MD5 c313ab19f54295cc0fc55d344578b369
BLAKE2b-256 dc151827d67da45272ba8fdc53bc46f5d2ed4412dc4258372100b105de103f3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for site_doctor-0.1.1.tar.gz:

Publisher: publish.yml on aashishbharti04/site-doctor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file site_doctor-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: site_doctor-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for site_doctor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37815cb020d1b1d78358b3c0c4a058cf4d10cb328b2fb8894a6d1f80f254ce1e
MD5 26ec423dcc0a36af88395731ba47a57d
BLAKE2b-256 8907250535ab7cb42df279907693cdca334e060686b1dd64034d0aba1f8b84be

See more details on using hashes here.

Provenance

The following attestation bundles were made for site_doctor-0.1.1-py3-none-any.whl:

Publisher: publish.yml on aashishbharti04/site-doctor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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