我想用urllib2,urllib或者请求登录https://pg.account.box.com/login。如何单击其中一个库的“继续”按钮并找到它重定向到的页面?
<form class="form-buttons is-shortened" method="post" action="/login">
<button type="submit" class="btn btn-primary btn-full-width"> Continue</button>
<input type="hidden" name="redirect_url" value="/folder/18451177659">
<input type="hidden" name="request_token" value="b0d590b1d8e93d47b8c482b4d1bc791f804c02679debda8b84d0724e4bb0f2e1">
</form>
答案 0 :(得分:0)
通过请求发帖请求:
导入请求
data = {&#39;登录&#39;:&#39; your_login&#39;, &#39;密码&#39;:&#39; your_password&#39;, ....来自浏览器中的帖子请求的另一个数据}
session = requests.Session()
login_to_website = session.post(&#39; url&#39;,data = data)