URLError和HTTPError基础用法

URLError是urllib库的error模块,属性reason表示错误缘由  html from urllib import request,error try: response = request.urlopen('https://cuiqingcai.com/index.htm') except error.URLError as e: print(e.reason) 上
相关文章
相关标签/搜索