The command line tool for checking dead link
Project description
Dead_Link_Checker
RELEASES
Dead Link Checker (Release 0.1)
About DLChecker
This repository is a command-line tool to find and report a dead URL status in a file. This tool can help users to check the broken link and show the list of broken links.
Features
- Searching for the URLs in the input files
- Checking multiple URLs by typing URL in the command line
- Organizing links each working and broken URLs
- Providing [Help] option to show users how to use this tool
- Showing unknown URLs which have status code(not 200 and 400~599), error, or long loading (1.5 seconds timeout)
Optional Features
- Starting an argument with -v/-V can be supplied to the program for current version information.
- Printing good status[200] URLs with green colour and bad status[400,404] URLs with red colour
Getting Started
- Clone the repo
git clone https://github.com/sonechca/Dead_Link_Checker.git
- The DLChecker file in the DEAD_LINK_CHECKER folder on the command line
cd DEAD_LINK_CHECKER
- Install library
pip3 install requests
pip3 install coloarama
- DLChecker run command
python3 DLChecker.py <filename> or <URL>
Help/Usage
Users can call the help/usage box if they do not know how to use this tool.
python3 DLChecker.py (blank) or python3 DLChecker.py -h/-H
Library
- Requests
- Requests is an elegant and simple HTTP library for Python, built for human beings.
- Requests allows you to send HTTP/1.1 requests extremely easily.
- User can check the response status code
>>> r = requests.get('https://httpbin.org/get') >>> r.status_code 200
Issues
- Colouring in CMD not work #1
- Use the correct python way when checking for empty/non-empty lists #2
- The current version of the tool cannot read the redirect status code(303, 308). The tool is recognizing that redirect is an error exception
- After the install of requests. I think you should include another line reminding the user to also download: "Pip3 install colorama"
Solution
- Adding the colorama library to fix error. I used function that contain gray color code to use for unknown URL. Colorama library does not have gray color
- I fixed the condition code to check links list and dead_links list
- I added the comment of installation
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
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
File details
Details for the file Dead-Link-Checker-1.0.0.tar.gz.
File metadata
- Download URL: Dead-Link-Checker-1.0.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8d17ab9aaa65a069b3ed845ab40b1461a8959ce5a9c6b501afe2f4923293d54
|
|
| MD5 |
a0551b03564db9f7254a6b98f5195981
|
|
| BLAKE2b-256 |
28a0b9bb353b1f0dd18b3ba679faf404393705f6fb2c5e18b577b3ea574e370d
|
File details
Details for the file Dead_Link_Checker-1.0.0-py3-none-any.whl.
File metadata
- Download URL: Dead_Link_Checker-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61c27196cad733e8c35591f247901766a049bdcf8b81073c76c2d2128f5a53f3
|
|
| MD5 |
345b2fc68ecb6794344b979f2995ec99
|
|
| BLAKE2b-256 |
c1f52088406bc52bf9f35c1dd87e9ca6cef51fe0872edb537d933ad01824a533
|