0
我正在嘗試註冊一種形式。但是我怎麼知道,如果它的工作原理,或形式給予(如密碼短)什麼錯誤Python - 機械化 - 如何知道它是否工作?
import mechanize
br = mechanize.Browser()
br.open("http://www.gutefrage.net/nutzer_hinzufuegen")
br.select_form(name = "regForm")
br.form['fRegister[nickname]'] = 'Username'
br.form['fRegister[email]'] = '[email protected]'
br.form['fRegister[password]'] = 'password'
for i in range(0, len(br.find_control(name="fRegister[accept]").items)):
br.find_control(name="fRegister[accept]").items[i].selected =True
req = br.submit()