Skip to main content

A tool to find broken links (404s) and oversized pages in websites

Project description

404 Finder

A Python tool to crawl websites and find broken links (404s) and oversized pages.

Install the CLI

pip install find_404

Usage

find_404 example.com [options]

Options

  • --max-size BYTES: Maximum allowed size in bytes for any page
  • --workers N: Number of parallel workers (default: 10)
  • --max-depth N: Maximum depth to crawl (default: no limit)
  • --verbose: Enable verbose logging
  • --version: Show the version number

Example

# Check for broken links on example.com
find_404 example.com

# Check for broken links and pages larger than 1MB
find_404 example.com --max-size 1000000

# Crawl with 20 parallel workers and verbose logging
find_404 example.com --workers 20 --verbose

Use in Github Actions

name: Check Website Links

on:
  workflow_dispatch: # Manual trigger
  schedule:
    # Every Sunday at midnight
    - cron: '0 0 * * 0'

jobs:
  check-links:
    uses: singiamtel/find_404/.github/workflows/check-links.yml@main
    with:
      url: 'https://example.com'
      max_size: 5000000  # Optional: 5MB limit
      # workers: 12        # Optional: 12 parallel workers
      # max_depth: 5       # Optional: Crawl up to a maximum depth of 5 (only in the original domain, others always have depth 1)
      # verbose: true      # Optional: Enable verbose logging

Output

The tool generates a JSONL file named result_domain.jsonl containing details about each URL visited, including:

  • URL
  • Status code
  • Page size
  • Referrer (the page that linked to this URL)

Features

  • Parallel crawling with configurable number of workers
  • Finds broken links (HTTP status codes 4xx and 5xx)
  • Checks page sizes against a configurable limit
  • Follows redirects while staying within the same domain
  • Handles both internal and external links
  • Generates detailed JSONL reports

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

find_404-1.1.6.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

find_404-1.1.6-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file find_404-1.1.6.tar.gz.

File metadata

  • Download URL: find_404-1.1.6.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for find_404-1.1.6.tar.gz
Algorithm Hash digest
SHA256 6a9ab0b5845225ff34ee8dd6a61a60ea5c853191ea86c57aa34150e00ddbb238
MD5 52d10453f1233e470dab43a48c15e7eb
BLAKE2b-256 b683a5f0ababfa28d2677180b2469aa1af6b513c679fb50d1917f42738a436b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for find_404-1.1.6.tar.gz:

Publisher: publish.yml on singiamtel/find_404

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

File details

Details for the file find_404-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: find_404-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for find_404-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0796a47e2a468bb3e497d978d55b5b252a5508b139e3abb514b3df87ec94c891
MD5 2030e319736db723a17e011e66f9307d
BLAKE2b-256 0a673edcf8ff30c7cf649dce31046fe2278049be6b8ffa3d139beac13b30976f

See more details on using hashes here.

Provenance

The following attestation bundles were made for find_404-1.1.6-py3-none-any.whl:

Publisher: publish.yml on singiamtel/find_404

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