33from http import HTTPStatus
44from fake_useragent import UserAgent
55
6+
67def get_status (status_code : int ) -> str :
78 for value in HTTPStatus :
89 if value .value == status_code :
910 description = f'({ value .value } { value .name } ) { value .description } '
1011 return description
1112 return "Unknown Status Code..."
1213
14+
1315def check_website ():
1416 website_url = website_entry .get ()
1517 result_text .delete ("1.0" , tk .END )
@@ -24,17 +26,20 @@ def check_website():
2426
2527 result_text .insert (tk .END , result )
2628
29+
2730root = tk .Tk ()
2831root .title ("Website Checker" )
29- root .configure (bg = "#1e1e1e" )
32+ root .configure (bg = "#1e1e1e" )
3033
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" )
3236website_label .pack (pady = 5 )
3337
3438website_entry = tk .Entry (root , width = 50 )
3539website_entry .pack (pady = 5 )
3640
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" )
3843check_button .pack (pady = 5 )
3944
4045result_text = tk .Text (root , wrap = tk .WORD , bg = "#1e1e1e" , fg = "white" )
0 commit comments