File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change
1
+ test
Original file line number Diff line number Diff line change 1
1
import os
2
2
import requests
3
- from requests .models import HTTPError
4
3
5
4
def set_url ():
6
5
print ("Welcome to IsItDown.py!" )
@@ -45,3 +44,40 @@ def set_url():
45
44
set_url ()
46
45
47
46
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
+
You can’t perform that action at this time.
0 commit comments