1. 首页
  2. 数据库
  3. 其它
  4. Python 仅获取响应头 不获取实体的实例

Python 仅获取响应头 不获取实体的实例

上传者: 2021-01-04 00:42:51上传 PDF文件 94.87KB 热度 10次
Python Just get Response Headers, not get content. 1. Use HEAD method >>> import requests >>> res = requests.head(http://www.baidu.com/) >>> req.head(https://www.baidu.com/).headers {'Content-Encoding': 'gzip', 'Server': 'bfe/1.0.8.18', 'Last-Modified': 'Mon, 13 Jun 2016 02:50:08 GMT', 'Connect
用户评论