【发布时间】:2014-11-21 05:14:13
【问题描述】:
我想在表单的文本字段中输入一些文本。这是我当前的代码。接下来我该怎么办?
import re
from mechanize import Browser
br = Browser()
br.open("xyz.com")
formcount=0
for frm in br.forms():
if str(frm.attrs["id"])=="xyz":
break
formcount=formcount+1
br.select_form(nr=formcount)
## What should I code here to input text into the form?
response = br.submit()
【问题讨论】: