Skip to main content

webchk

https://img.shields.io/pypi/v/webchk.svg https://img.shields.io/travis/amgedr/webchk.svg https://img.shields.io/github/license/amgedr/webchk.svg

webchk is a command-line tool developed in Python 3 for checking the HTTP status codes and response headers of URLs. It accepts one or more URLs as arguments. Furthermore, a sitemap URL can be passed using the -p option to download its content, extract the URLs and check their statuses.

Installation

webchk is available on PyPI and can be installed using pip with the following command:

$ pip install webchk

Webchk does not require any 3rd party packages to run. So it can also be cloned from GitHub and run as a module:

$ git clone https://github.com/amgedr/webchk.git
$ cd webchk
$ python3 -m webchk

Usage

webchk [-h] [-i INPUT] [-o OUTPUT] [-p] [-a] [-l] [-s] [-f] [-v]
             [urls [urls ...]]

positional arguments:
  urls

optional arguments:
  -h, --help                   show this help message and exit
  -i INPUT, --input INPUT      Read input from a file
  -o OUTPUT, --output OUTPUT   Save output to a file
  -p, --parse                  Follow links listed in .xml URLs
  -l, --list                   Print URLs without checking them
  -v, --version                Print the version number

Examples

Check a list of URLs from a file (one URL per line):

$ webchk -i urls.txt

Check the status of a sitemap file and all the URLs listed in it:

$ webchk -p http://example.com/sitemap.xml

List the URLs in a file without checking their HTTP status:

$ webchk -li urls.txt

Check the URLs in a file and .xml files in it:

$ webchk -pi urls.txt

List the URLs in a file and .xml files in it:

$ webchk -pli urls.txt

List the URLs in a sitemap without checking their status:

$ webchk -lp http://example.com/sitemap.xml

History

1.2.0 (2022-02-19)

  • Default HTTP method is now HEAD

  • Added –get to switch to HTTP GET

  • Added –agent to set the User-Agent

  • Added –auth for adding Authorization header

  • Prevent timeouts less than 1

  • Display results immediately instead of at the end

1.1.0 (2022-02-05)

  • Handle connection related errors

  • Improve reporting of HTTP redirects

  • Added –timeout or -t to modify respose deadline

1.0.4 (2020-08-29)

  • Fix crash when an URL check times out

  • Fix –output command-line option

1.0.3 (2020-07-10)

  • Modify the Python versions tox tests

  • Fix failing unit tests

1.0.2 (2020-05-08)

  • Add Python versions 3.7 and 3.8 to the list of tested versions

1.0.1 (2020-05-08)

  • Fixed: Parsing sitemaps enters an endless loop

  • Fixed: Parsing a URL that does not exists exits with an unhandled exception

1.0.0 (2018-12-06)

0.3.0 (2018-03-24)

  • Run each check in its own thread

0.2.1 (2017-12-19)

  • Fixed: Status code description not being displayed

  • Improved PyPI and GitHub README

0.2.0 (2017-12-14)

  • Code refactoring

  • Created setup.py

Metadata

Release files for webchk 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for webchk 1.2.0
File Interpreter ABI Platform
webchk-1.2.0-py3-none-any.whl Python 3 none any Details

Release files / webchk-1.2.0-py3-none-any.whl

Download URL webchk-1.2.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f72b46c0dae916a0384860c27b284b00fb9b909f9525617117b0243bc62e776e
BLAKE2b-256 checksum
How to use checksums
00b3f0d08169c1bcb6465116ae20154512bf9244d49d12fc9703e42c62e51e4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.10

Release history Release notifications | RSS feed

This release

1.2.0 This release

1 release file

1.1.0

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

2 release files

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page