Python3 requests包学习
来源:互联网 发布:c语言需要掌握 编辑:程序博客网 时间:2024/06/05 20:02
requests 版本: v2.10.0.
中文文档链接:http://docs.python-requests.org/zh_CN/latest/index.html
用户指南
简介
- 开发哲学
- Apache2 协议
- Requests协议
安装
- Pip Install Requests
- 获得源码
快速上手
- 发送请求
- 传递URL参数
- 响应内容
- 二进制响应内容
- JSON响应内容
- 原始响应内容
- 定制请求头
- 更加复杂的POST请求
- POST一个多部分编码(Multipart-Encoded)的文件
- 响应状态码
- 响应头
- Cookie
- 重定向与请求历史
- 超时
- 错误与异常
高级用法
- 会话对象
- 请求与响应对象
- 准备的请求(Prepared Request)
- SSL证书验证
- CA证书
- 响应体内容工作流
- 保持活动状态(持久链接)
- 流式上传
- 块编码请求
- POST多个分块编码的文件
- 事件挂钩
- 自定义身份验证
- 流式请求
- 代理
- 合规性
- HTTP动词
- 响应头链接字段
- 传输适配器
- 阻塞和非阻塞
- Header排序
- 超时(timeout)
身份验证
- 基本身份验证
- 摘要式身份验证
- OAuth 1 认证
- 其他身份认证形势
- 新的身份验证形式
实践
快速上手
文档链接为:
http://docs.python-requests.org/zh_CN/latest/user/quickstart.html#id2
# python3import requestsr1 = requests.get("https://github.com/timeline.json")r2 = requests.post("http://httpbin.org/post")r3 = requests.put("http://httpbin.org/put")r4 = requests.delete("http://httpbin.org/delete")r5 = requests.head("http://httpbin.org/get")r6 = requests.options("http://httpbin.org/get")
0 0
- Python3 requests包学习
- python3学习-requests使用
- python3 requests
- python3使用requests包抓取并保存网页源码
- python3爬虫(一)requests库的学习
- Python3爬虫学习笔记(2.Requests库详解)
- python3 requests模块安装
- python3.5安装requests
- python3 requests简介
- requests学习
- Requests 学习
- 安装Python3.6和requests
- Python3 第三方模块requests
- python3 xpath和requests应用
- Python3之Requests模块详解
- python3 json/requests 相关备忘
- python3 requests请求截取JSESSIONID
- python-requests包
- 内部类
- 开源库编译
- Mina框架 open to many file 错误原因以及解决方案
- 关于科研
- MapReduce二次排序(secondary sort)实战
- Python3 requests包学习
- Easyui使用formatter格式化单元格为空解决办法
- 《Java高并发程序设计》学习 --4.3 ThreadLocal
- bzoj 1568 && bzoj 3165 超哥线段树
- Linux中iptables设置详细
- 【POJ2481】cows 线段树
- (凸优化理论学习笔记2017/3/18)Theory of Convex Optimeization for Machine Learning(Sebatien Bubeck)
- FFMPEG 编码YUYV 数据
- Learning to Track at 100 FPS with Deep Regression Networks 论文理解及应用笔记(二)