摘要:
'''Basic Authenticationfrom requests.auth import HTTPBasicAuthr1 = requests.get("https://httpbin.org/basic-auth/user/passwd",auth=HTTPBasicAuth("user" 阅读全文
摘要:
#cookie主要放在本地浏览器,存在客户端'''r.cookies#获取cookiesrequests.utils.dict_from_cookiejar(r.cookies)#jar包转化为字典requests.utils.cookiejar_from_dict()#字典转化为jar包r = r 阅读全文
摘要:
#requests.get(url,proxies=proxies)#设置代理import requests#1.使用代理proxies = { "http":"http://10.10.1.10:3128", "https":"http://10.10.1.10:1080"}requests.ge 阅读全文
摘要:
#r = requests.post(url,json=data) 阅读全文
摘要:
#上传文件的post请求 阅读全文
摘要:
#含有参数的post请求 r = requests.post(url,data=data,params=params) 阅读全文
摘要:
#有headers的get请求 r = requests.get(url,params=params,headers=headers) 阅读全文
摘要:
#有参数get请求 r = requests.get(url,params=params) 阅读全文
摘要:
#无参数get请求 r = requests.get(url) 阅读全文