Friday, October 7, 2022

[ Website status check ]

Using Requests, one of the most popular HTTP libraries for Python, I created a program that shows you the status of a website. I needed a similar tool for project I did where we had to check a list of URLs whether there is a site hosted or there is not. The task was simple but it gave me the idea for the program. See the screenshot below. In it I am giving you a very short example how my program works in Windows PowerShell:

In this example I have tried four URLs. Two returned me an OK status, which means the website is present and operational. One replied with Not Found. This indicates that there is no website hosted on the given URL, but the address is available for registration. The last one is an URL to a non existing website and my program says exactly this: Website Does Not Exist.

I have included many more HTTP status codes in my program, so it can return more replies from a given URL address.

If you have any questions, you are welcome to contact me using the form on the right side. I am available for collaboration with you also if you have similar project or need a program like this to check websites status or availability. You can send me a message using the contact form on my blog.

Check this video to see how you can get information or answers from Internet using the same Requests library and Python.