Skip to content

Commit 82e545e

Browse files
committed
test
1 parent 98ae041 commit 82e545e

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

day2_3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test

homework3.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22
import requests
3-
from requests.models import HTTPError
43

54
def set_url():
65
print("Welcome to IsItDown.py!")
@@ -45,3 +44,40 @@ def set_url():
4544
set_url()
4645

4746

47+
# import os
48+
# import requests
49+
50+
# def restart():
51+
# answer = str(input("Do you want to start over? y/n ")).lower()
52+
# if answer == "y" or answer =="n":
53+
# if answer == "n":
54+
# print("k. bye!")
55+
# return
56+
# elif answer == "y":
57+
# main()
58+
# else:
59+
# print("That's not a valid answer")
60+
# restart()
61+
62+
63+
# def main():
64+
# os.system('clear')
65+
# print("Welcome to IsItDown.py!\nPlease write a URL or URLs you want to check. (separated by comma)")
66+
# urls = str(input()).lower().split(",")
67+
# for url in urls:
68+
# url = url.strip()
69+
# if "." not in url:
70+
# print(url, "is not a valid URL.")
71+
# else:
72+
# if "http" not in url:
73+
# url = f"http://{url}"
74+
# try:
75+
# request = requests.get(url)
76+
# if request.status_code == 200:
77+
# print(url,"is up!")
78+
# else:
79+
# print(url, "is down!")
80+
# except:
81+
# print(url, "is down!")
82+
# restart()
83+

0 commit comments

Comments
 (0)