python-requests - 仅使用密码使用 Python 请求
问题描述
我正在尝试使用请求登录到一个只有密码字段而没有用户名的网站。每当我尝试使用简单的请求时:
response = requests.get(URL, auth = ('password'), verify=False)
我得到的只是要求输入密码的页面的 HTML 格式,如下所示:
'<html><head>\t<title>Relay Diagnostics Login page</title></head><body>\t<form action="/rd" method="POST">\t\tPlease, enter the password to access the Relay Diagnostics page:\t\t<br />\t\t<input type="password" placeholder="Password" name="password" />\t\t<br />\t\t<input type="submit" value="Login" />\t\t<input type="hidden" name="rnd" value="WtKEYTI64T3InibBmG+OKVM9dIo" />\t</form></body></html>'
反正有没有只用密码就可以通过身份验证?
谢谢
解决方案
很少有网站只有密码。尝试auth=('','password')
或auth=(None,'password')
推荐阅读
- azure-devops - Azure Devops YML 模板条件和依赖项
- java - Java中私有Map成员的访问方法
- kubernetes-helm - 调用 tpl 时出现错误错误:在安装 helm chart 时为“environment.yaml”未关闭操作执行 tpl 函数期间出错
- azure-ad-b2c - B2C 的 SSPR 密码策略是什么?
- flutter - Flutter - 出现键盘时出现底部溢出问题
- swift - 使用 Alamofire 和 SwifrtJSON 以及完成处理程序(@escaping)在 tableview 中解析和映射数据
- html - HTML/CSS 多行单选按钮
- r - 如何根据时间块创建唯一索引
- javascript - WordPress elementor 项目
- sql - 您可以通过多列在 SQL 2 表中进行 INNER JOIN 吗?