Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
This script checks if the url/web address entered is active or not
  • Loading branch information
TheProv1 authored Oct 15, 2023
1 parent b91c8e8 commit eb65833
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Website_Status_checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import requests

def check_status(url):
try:
resp = requests.get(url)
if resp.status_code == 200:
print("Website is up and running")
else:
print("Website is unreachable")

except requests.ConnectionError:
print("Error, website url or address is not currently available")

web_link = input("Enter the name of the website: ")

check_status(web_link)

0 comments on commit eb65833

Please sign in to comment.