Python3爬虫 – requests库的requests.exceptions所有异常详细说明
原创文章,作者:StubbornHuang,如若转载,请注明出处:《Python3爬虫 – requests库的requests.exceptions所有异常详细说明》https://www.stubbornhuang.com/552/
requests 全部异常详细说明
- requests.exceptions.HTTPError:HTTP错误
- requests.exceptions.ConnectionError:连接错误
- requests.exceptions.ProxyError:代理错误
- requests.exceptions.SSLError:SSL错误
- requests.exceptions.Timeout:请求超时错误,包含requests.exceptions.ConnectTimeout和requests.exceptions.ReadTimeout
- requests.exceptions.ConnectTimeout:尝试连接到远程服务器时错误
- requests.exceptions.ReadTimeout:服务器未在分配的时间内发送任何数据
- requests.exceptions.URLRequired:url格式错误
- requests.exceptions.TooManyRedirects:过多的重定向
- requests.exceptions.MissingSchema:网址架构(例如http或https)丢失
- requests.exceptions.InvalidSchema:无效的架构
- requests.exceptions.InvalidURL:无效的url
- requests.exceptions.InvalidHeader:无效的请求头
- requests.exceptions.InvalidProxyURL:无效的代理链接
- requests.exceptions.ChunkedEncodingError:服务器声明了分块编码,但发送了无效的分块
- requests.exceptions.ContentDecodingError:解码响应内容失败
- requests.exceptions.StreamConsumedError:该响应的内容已被占用
- requests.exceptions.RetryError:自定义重试逻辑失败
- requests.exceptions.UnrewindableBodyError:尝试快退正文时,请求遇到错误
当前分类随机文章推荐
- Python3爬虫 - requests的请求响应状态码(requests.status_code)
- Python:UnicodeEncodeError: 'gbk' codec can't encode character '\xbb' in position 12305,以及中文乱码的解决方案
- Pip - 常用命令(安装,卸载,升级第三方库)
- 简单粗暴:使用pycharm安装对应的Python版本第三方包
- Python3 - 正则表达式去除字符串中的特殊符号
- Python3爬虫 - requests库
- Python3爬虫 - requests库的requests.exceptions所有异常详细说明
- opencv-python - 读取视频,不改变视频分辨率修改视频帧率
- Python3 - 导入模块和函数
- Python3爬虫 - 下载反盗链图片的方式
全站随机文章推荐
- Python3爬虫 - requests库
- 资源分享 - Ray Tracing - The Next Week英文高清PDF下载
- OpenCV - 创建新图像以及遍历图片像素值和设置像素值
- 工具网站推荐 - 获取本机外网IP
- WordPress - get_post_type():获取当前文章或者给定文章类型
- Modern OpenGL - GLSL着色语言3:GLSL中的数据类型
- 资源分享 - Computer Graphics Principles and Practice (3rd edition) 英文高清PDF下载
- C++ 11 - final关键字简要介绍
- Duilib - 各个控件的消息响应类型
- 我的开源项目 - 3DPoseEstimation从2D视频中估计人物三维姿势,并生成BVH文件