I want to select a form with mechanize. This is my code:
br = mechanize.Browser()
self.br.open(url)
br.select_form(name="login_form")
The form's code:
<form id="login_form" onsubmit="return Index.login_submit();" method="post" action="index.php?action=login&server_list=1">
But I'm getting this Error:
mechanize._mechanize.FormNotFoundError: no form matching name 'login_form
def element_by_id(id): return 'id' in f.attrs and f.attrs['id'] == 'login_form'
? – Santo