checks for deadlinks in an html file or from a website. Done as part of DPS 909- Seneca College
Project description
linkReaper-cli - Release 0.1
A Python cli tool for finding dead links in html files and websites. Completed as part of DPS909 open-source course for Seneca College.
Functionalities and Features
linkReaper searches through html files stored locally and those pulled
from the web and determines whether any of the links in file are dead. It collects the link's response and then displays
the status code and the corresponding link with a short description
of the result. These are color coded for the user's convenience and for easy identification of dead links.
Optional Features
- Looks through a webpage for dead links given the url
- Colourized output
- Red for bad urls
- Green for good urls
- Yellow for any urls with abnormal/unknown behaviour
- Option to check if http links work as https when looking through both local files and web pages
- all http links found will have their scheme changed to https and will output the result
- Optimized to search only through the headers rather than full bodies
- Doesn't download the full page when looking for a response
- Option to only output only good, only bad and all links
- good option will only output links with 200 response code
- bad option will output anything else
- all option is default and will output all
- Option to have the outputs in json format
- This works with the good,bad and all output options
Usage
This program has two main capabilities:
- Find broken links in local html files
- Find broken links in a website given the url
Entering the program name with no arguments will show the help page.
Local files
options
-s , --s
Checks if http links works as https
-bad, --b
Outputs only the links that don't have a successful response
-good, --g
Outputs only the links that have a successful response
-all, --a
The default, outputs all the links
-json, --j
Outputs the results as a json array. This options works with the '-good', '-all', and '-bad' options.
Command:
Look through local file
linkreaper readfile [file path]
Check if the http links work with the https scheme
linkreaper readfile -s [file path]
Have all the good links outputted in json format
linkreaper readfile --g --j [filepath]
Website
Command:
Look through a webpage
linkreaper readwebsite [website url]
Check if the http links work with the https scheme
linkreaper readwebsite -s [website url]
Have all the http links that don't work as https outputted as json
linkreaper readwebsite -s --b --j [website url]
Coverage
pip install coverage
for code coverage
releases
This project has been released on pypi. To install execute the following command in your terminal.
pip install linkreaper
Dependencies
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 linkreaper-0.0.6.tar.gz.
File metadata
- Download URL: linkreaper-0.0.6.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
988c48f7e9c15b0202dc7fce547fae94570b6ab7f26409fedaf9644d2fad973b
|
|
| MD5 |
382e230cac99c6771a1ea1c5570e4b33
|
|
| BLAKE2b-256 |
b0b5c6c53d0fe5d73b1eb47257a69e4eee982af4b3b174d22a21934943f6949e
|
File details
Details for the file linkreaper-0.0.6-py3-none-any.whl.
File metadata
- Download URL: linkreaper-0.0.6-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ebd7edfbfbdac72381e6a80a8fc4eca09f173e36b01053eba44bcb448120983
|
|
| MD5 |
24a51dc879b89cf39c8890ff66f6af5d
|
|
| BLAKE2b-256 |
bf6c5f46e9c83902a2de3b361849a51d0a22da2a5fde9c23389b5218dc1e4d0e
|