python_jc

This commit is contained in:
dengrb1
2023-05-12 21:44:50 +08:00
committed by GitHub
parent 738bfe35d6
commit 65d292fb54

View File

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