-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
三国情 评论区 #687
Comments
Failed at 2/2 request, 你遇到的错误表明请求失败,并且在响应中未能满足断言条件。具体错误消息指示断言失败:
这表示你预期的响应状态码是302(重定向),但实际返回的不是这个状态码。让我们一步步检查和解决这个问题。 解决方法
示例代码以下是一个可能的解决方案,假设你使用的是Python中的 import requests
# 请求的URL
url = "https://www.975w.com/plugin.php?id=yinxingfei_zzza%3Ayinxingfei_zzza_post"
# 请求头(示例)
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"Referer": "https://www.975w.com/",
# 其他必要的头
}
# 请求参数(示例)
data = {
"param1": "value1",
"param2": "value2"
}
# 发送POST请求
response = requests.post(url, headers=headers, data=data, allow_redirects=False)
# 检查响应状态码
if response.status_code == 302:
print("Success: Received 302 status code")
else:
print(f"Failed: Received {response.status_code} status code")
# 如果需要跟踪重定向
if response.is_redirect:
print(f"Redirected to: {response.headers['Location']}") 详细解释
调试建议
如果以上方法仍然无法解决问题,请提供更多细节,如你使用的完整请求代码和具体的错误信息。这样可以更准确地诊断问题。 |
你是不是已经摇过了 明天在试试看。 |
好的谢谢 |
HAR 模板名称
三国情
作者信息
李大爷
模板备注及说明
Cookie 日志显示
HAR 文件名
三国情.har
其他信息
No response
HAR 模板内容
The text was updated successfully, but these errors were encountered: