Fix ep < 10 and htt:\\google to https;\\google

This commit is contained in:
Lovi-0 2024-07-20 13:21:06 +02:00
parent a485b3feb4
commit bbed4d9d12
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ def dynamic_format_number(n: int) -> str:
Returns: Returns:
- str: The formatted number as a string with a leading zero if the number is less than 9. - str: The formatted number as a string with a leading zero if the number is less than 9.
""" """
if n < 9: if n < 10:
width = len(str(n)) + 1 width = len(str(n)) + 1
else: else:
width = len(str(n)) width = len(str(n))

View File

@ -286,7 +286,7 @@ def check_internet():
while True: while True:
try: try:
# Attempt to open a connection to a website to check for internet connection # Attempt to open a connection to a website to check for internet connection
urllib.request.urlopen("http://www.google.com", timeout=1) urllib.request.urlopen("https://www.google.com", timeout=3)
console.log("[bold green]Internet is available![/bold green]") console.log("[bold green]Internet is available![/bold green]")
break break