request
作者:互联网
各种请求方式
1 import request 2 request.post() 3 request.put() 4 request.delete() 5 request.head() 6 request.options()
1 请求 2 import requests 3 reponse = requests.get(url) 4 print(reponse.text) 5 带参数get请求 6 import requests 7 reponse =requestes.get() 8 print(reponse.txet) 9 10 import requests 11 data={}#字典 12 reponse = requests.get('url'params=data) 13 print(reponse.text) 14 15 import requests 16 reponse -= requests.get() 17 with open ('','wb') as f : 18 f.write(reponse.content) 19 f.close()
标签:get,request,reponse,print,import,requests 来源: https://www.cnblogs.com/my-rw/p/11615701.html