try ... except...,好处是执行失败后,仍然可以继续运行
import requests
try:
a=requests.get("https:///www.baidu.com")
print('连接成功')
except:
print('连接失败')
print('go on runing')
越努力,越幸运!!!
good good study,day day up!!!
import requests
try:
a=requests.get("https:///www.baidu.com")
print('连接成功')
except:
print('连接失败')
print('go on runing')