python 异常的捕获
python 异常的处理
def request_download(imgUrl,fileUrl):
try:
r = requests.get(imgUrl)
with open(fileUrl, 'wb') as f:
f.write(r.content)
except Exception:
print("下载失败")站长微信:xiaomao0055
站长QQ:14496453