python_jc

This commit is contained in:
dengrb1
2023-05-12 21:42:26 +08:00
committed by GitHub
parent 0b7b7585d5
commit 738bfe35d6

View File

@@ -18,7 +18,7 @@ def open_exe(exe_name):
print(file_error)
sleep(1)
pass
def check_internet(url='http://www.baidu.com/', timeout=5):
def check_internet(url='http://www.baidu.com/', timeout=3):
try:
urllib.request.urlopen(url, timeout=timeout)
return True