返回 Skill 列表
extension
分类: 数据与分析无需 API Key

Dead Link Scanner

扫描网站、Markdown、HTML 文件中的失效链接,检查网站的 404 错误或验证文档、README 中的链接。

person作者: johnnywang2001hubclawhub

dead-link-scanner

Find broken links in websites, markdown files, and HTML documents.

Quick Start

# Scan a website for broken links
python3 scripts/dead_link_scanner.py scan https://example.com

# Scan with depth limit (default: 1)
python3 scripts/dead_link_scanner.py scan https://example.com --depth 3

# Scan a local markdown file
python3 scripts/dead_link_scanner.py file README.md

# Scan multiple files
python3 scripts/dead_link_scanner.py file docs/*.md

# JSON output
python3 scripts/dead_link_scanner.py scan https://example.com --json

# Only show broken links
python3 scripts/dead_link_scanner.py scan https://example.com --broken-only

Commands

scan

Crawl a website and check all links on each page.

python3 scripts/dead_link_scanner.py scan <url> [options]

Options:

  • --depth <n> — Max crawl depth (default: 1, 0 = single page only)
  • --timeout <seconds> — Request timeout (default: 10)
  • --json — Output results as JSON
  • --broken-only — Only show broken links
  • --internal-only — Only check links within the same domain
  • --max-urls <n> — Max URLs to check (default: 200)
  • --delay <seconds> — Delay between requests (default: 0.2)

file

Scan local markdown or HTML files for broken links.

python3 scripts/dead_link_scanner.py file <path>... [options]

Options:

  • --timeout <seconds> — Request timeout (default: 10)
  • --json — Output as JSON
  • --broken-only — Only show broken links

Output

Default text output:

✓ 200  https://example.com/about
✓ 200  https://example.com/blog
✗ 404  https://example.com/old-page  (found on: https://example.com)
✗ ERR  https://dead-domain.xyz  (found on: https://example.com) — ConnectionError

Summary line:

Checked 42 links: 39 OK, 3 broken