帖子页面登录使用美丽的汤 [英] post to page to login using beautiful soup

查看:123
本文介绍了帖子页面登录使用美丽的汤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Python和beautifulsoup(新到两个!),我想登录到供应商的网站。

I'm using python and beautifulsoup (new to both!), and I want to login to a suppliers website.

所以,其形式看起来像(简体):

So their form looks like (simplified):

<form name=loginform action=/index.html method="post">

<input name=user>
<input name=pass">

</form>

有没有一种方法来跟踪饼干?

Is there a way to keep track for cookies?

推荐答案

做一些更多的阅读。

阅读的urllib2 这是你用来做一个POST登录什么。如果您知道&LT;输入&GT; 的名字,你并不需要美味的汤。 <一href=\"http://docs.python.org/library/urllib2.html\">http://docs.python.org/library/urllib2.html

Read about urllib2 That's what you use to do a POST to login. If you know the <input> names, you don't need Beautiful Soup. http://docs.python.org/library/urllib2.html

美丽的汤是你用什么来解析结果的页面。登录后。之后您发布的真正要求。

Beautiful Soup is what you use to parse a page of results. After you login. After you post the real request.

这篇关于帖子页面登录使用美丽的汤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆