requests模块的使用

数据库61

安装:pip install requests

get请求

1、发送 get 请求

import requests

header = {
    'referer': 'https://www.baidu.com'
}

# 请求并获取返回结果
re = requests.get('https://t7.baidu.com/it/u=1951548898,3927145&fm=193', headers=header)

2、请求中携带数据

```python

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长