python学习——requests库的基本用法
获取某个网页 import requests r = requests. get('https://www.baidu.com/') print(type(r)) print(r. status_code) print (type(r. text)) print(r. text) print(r.cookies) 各种请求 # 发送一个 HTTP POST 请求: r = requests.post(http://httpbin.org/post, data = {'key':'value'}) r = requests.delete('http://httpbin.org/delete
用户评论