3
3
from http import HTTPStatus
4
4
from fake_useragent import UserAgent
5
5
6
+
6
7
def get_status (status_code : int ) -> str :
7
8
for value in HTTPStatus :
8
9
if value .value == status_code :
9
10
description = f'({ value .value } { value .name } ) { value .description } '
10
11
return description
11
12
return "Unknown Status Code..."
12
13
14
+
13
15
def check_website ():
14
16
website_url = website_entry .get ()
15
17
result_text .delete ("1.0" , tk .END )
@@ -24,17 +26,20 @@ def check_website():
24
26
25
27
result_text .insert (tk .END , result )
26
28
29
+
27
30
root = tk .Tk ()
28
31
root .title ("Website Checker" )
29
- root .configure (bg = "#1e1e1e" )
32
+ root .configure (bg = "#1e1e1e" )
30
33
31
- website_label = tk .Label (root , text = "Enter Website URL:" , bg = "#1e1e1e" , fg = "white" )
34
+ website_label = tk .Label (
35
+ root , text = "Enter Website URL:" , bg = "#1e1e1e" , fg = "white" )
32
36
website_label .pack (pady = 5 )
33
37
34
38
website_entry = tk .Entry (root , width = 50 )
35
39
website_entry .pack (pady = 5 )
36
40
37
- check_button = tk .Button (root , text = "Check Website" , command = check_website , bg = "#303030" , fg = "white" )
41
+ check_button = tk .Button (root , text = "Check Website" ,
42
+ command = check_website , bg = "#303030" , fg = "white" )
38
43
check_button .pack (pady = 5 )
39
44
40
45
result_text = tk .Text (root , wrap = tk .WORD , bg = "#1e1e1e" , fg = "white" )
0 commit comments