会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Aliwall
博客园
首页
新随笔
联系
管理
订阅
随笔分类 -
requests
unittest 用例间数据共享参数传递.
摘要:1 import unittest 2 import requests 3 import urllib3 4 urllib3.disable_warnings() 5 import warnings # 解决错误 ResourceWarning: Enable tracemalloc to get
阅读全文
posted @
2021-05-17 16:47
Aliwall
阅读(486)
评论(0)
推荐(0)
字典传参
摘要:# 字典传参 token = 'ajkdakkfweids' name = "Jack" body = { 'aaa': '123', 'bbb': '567', 'token': token, #直接用变量代替参数, 注意参数是不需要引号的 'user': 'userid%s' %name # 参
阅读全文
posted @
2021-05-17 16:40
Aliwall
阅读(152)
评论(0)
推荐(0)
unittest requests InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
摘要:unittest requests 在添加了以下代码依然出现以下错误: 1 import urllib3 2 urllib3.disable_warnings() InsecureRequestWarning: Unverified HTTPS request is being made. Addi
阅读全文
posted @
2021-05-14 22:23
Aliwall
阅读(329)
评论(0)
推荐(0)
unittest requests 错误 ResourceWarning: Enable tracemalloc to get the object allocation traceback
摘要:unittest 使用 requests 发请求 遇到如下错误: ResourceWarning: Enable tracemalloc to get the object allocation traceback代码中添加以下红色代码即可. 1 import warnings 2 3 def se
阅读全文
posted @
2021-05-14 22:14
Aliwall
阅读(2167)
评论(0)
推荐(0)
Pycharm requests requests.exceptions.SSLError: HTTPSConnectionPool(host='xx.com.cn', port=443): Max retries exceeded with url: /passport/login (Caused by SSLError(SSLCertVerificationError
摘要:使用 python requests 遇到以下错误: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
阅读全文
posted @
2021-05-14 12:05
Aliwall
阅读(1070)
评论(0)
推荐(0)
User-Agent大全 python
摘要:1 # -*-coding:utf-8 -*- 2 3 import random 4 5 # 返回一个随机的请求头 headers 6 def getheaders(): 7 # 各种PC端 8 user_agent_list_2 = [ 9 # Opera 10 "Mozilla/5.0 (Wi
阅读全文
posted @
2019-08-16 22:58
Aliwall
公告