python - 如何使用 BeautifulSoup 填写登录表单
问题描述
我想使用 BeautifulSoup 填写登录表单(我知道这不是最简单的方法),但我不知道该怎么做。这里在loginForm 下。
<form id="loginForm" class="loginContainer" accept-charset="utf-8" action="/wipb2bweb/j_spring_security_check;jsessionid=C647FBABEB8C4ADC3DCCA3C6C875BECC.prod1" method="post"><fieldset>
<legend>Login</legend>
<img src="/wipb2bweb/_ui/themes/carhartt/images/loginTitle.png"
alt="Login" class="title" />
<form>
<div class="formRow">
<label for="User"><img
src="/wipb2bweb/_ui/themes/carhartt/images/loginLabelUser_de.png"
alt="Benutzername" />
</label>
<input id="User" name="j_username" type="text" value=""/></div>
<div class="formRow">
<label for="Password"><img
src="/wipb2bweb/_ui/themes/carhartt/images/loginLabelPass_de.png"
alt="Passwort" />
</label>
<input id="Password" name="j_password" type="password" value=""/></div>
<input type="submit" class="hiddenSubmit"/>
<a href="#" title="Login" class="btnGreyTextured">
<span>Login</span>
</a>
</form>
解决方案
推荐阅读
- hive - Hive 1.1.0 中的解码功能失败
- angular-cli - 浏览器加载 index.html 的缓存版本 - 角度 7
- android - 奥利奥之后的能见度变化行为有所不同
- php - Laravel getRealPath() 上传文件的当前位置不正确
- python - numpy.random.shuffle 令人惊讶的行为
- tcl - 写入前检查异常连接掉线
- c# - 如何在 C# 中使用 openXML 刷新(excel 表中的全部刷新按钮)excel 表
- javascript - console.log 中出现 Axios Stop 404 错误
- flutter - 关闭抽屉如何返回首页?
- perl - 如何存储哈希路径以在 perl 中重用它们?