A Python program that crawls slithers ๐ a website for links and prints a YAML report of broken links.
Python 3.6 or higher.
There are no external dependencies, Neo.
Run in a terminal:
python hydra.py [URL]
Ensure URL
is an absolute url including schema, i.e. https://example.com
.
The report will be YAML formatted. To save the output to a file, run:
python hydra.py [URL] > [PATH/TO/FILE.yaml]
You can add the current date to the filename using a command substitution, such as:
python hydra.py [URL] > /path/to/$(date '+%Y_%m_%d')_report.yaml
To see how long Hydra takes to check your site, add time
:
time python hydra.py [URL]
Run:
python -m unittest tests/test.py