Friday, March 15, 2013

Link Finder and Checker (python)


Summary:  This is a python script to check all the links on a single webpage to verify that all links are valid and not 404's.

Download: linkFindersmsV2.py

Make sure the latest python 2.7 is installed on your machine if not get it here and all paths are set correctly on your machine.

Now open a command prompt
navigate to where the linkfindersms.py is located in you directory







now run linkfindersms.py










It will prompt you for the URL, Enter the URL in this format: http://www.google.com
then hit enter.






If something other than a 200 response comes back you can see which links that cause the error by typing the code from the array.
In this example there is a 200 code and a 403 code.
type 403 to see what links on the page have the 403 code.



If your on a mac you can use the curl method to see what the response was that give the 0 error
Then type 'quit' to exit


leave comments of any other ideas you may have or errors in the code.






No comments:

Post a Comment