【发布时间】:2017-11-16 03:21:26
【问题描述】:
我正在尝试使用 python 向网站输入数据,搜索它然后提取地址,但不知道在此之后从哪里继续。到目前为止,我的代码如下所示:
import mechanize
br = mechanize.Browser()
response = br.open("https://www.matsugov.us/myproperty")
for form in br.forms():
print "Form name:", form.name
print form
这给了我表单名和表单。该表单在下拉列表中有多个字段,我需要选择税号搜索并获取值“218N02W27C003”,然后应该显示结果。从这个结果中,我们只需要获取包裹地址并显示输出。
【问题讨论】:
-
@martineau 很抱歉格式化不顺利
标签: python python-2.7 web-scraping mechanize