随笔分类 -  python接口自动化

摘要:1.参考代码 import requests import json import warnings warnings.filterwarnings('ignore') def getHeaders(): headers = { 'Content-Type': 'application/x-www- 阅读全文
posted @ 2021-04-12 20:23 Penny悦 阅读(65) 评论(0) 推荐(0) 编辑
摘要:1. 带token的请求 import requests import warnings warnings.filterwarnings('ignore') host = 'https://buyerapi.chinagoods.com/v1/auth/login' body = {"grant_t 阅读全文
posted @ 2021-04-12 14:38 Penny悦 阅读(412) 评论(0) 推荐(0) 编辑
摘要:参考链接:https://www.cnblogs.com/yoyoketang/p/6828424.html 1.payload参数是字典类型,传到如下图的form里 参考代码: import requests import warnings warnings.filterwarnings('ign 阅读全文
posted @ 2021-02-08 21:41 Penny悦 阅读(94) 评论(0) 推荐(0) 编辑
摘要:学习链接:https://www.cnblogs.com/yoyoketang/p/6810643.html 1. 参考代码: import requestsimport warningswarnings.filterwarnings('ignore')# 不带参数# url = 'http://y 阅读全文
posted @ 2021-01-27 22:45 Penny悦 阅读(92) 评论(0) 推荐(0) 编辑
摘要:参考链接:https://www.cnblogs.com/yoyoketang/p/14214477.html import requests requests = requests.get('https://www.baidu.com') print(requests) 报错: 解决方法: imp 阅读全文
posted @ 2021-01-27 11:15 Penny悦 阅读(1433) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示