Bonjour,
J'ai un problème j'utilise mechanize python pour remplir un formulaire .
Cela fonctionne sauf pour mettre un checkbox en checked pouvez vous m'aider .
Merci
le formulaire
Python code<form enctype="multipart/form-data" method="post" name="forms">
<input name="mass">
<input name="call">
<input name="agree" type="checkbox" value="1">
br.select_form(name="forms")
br["mass"] = ["21"]
br["call"] = ["13"]
br.form.request.get('agree', '').lower() in ['true', 'yes','t', '1','on', 'checked']
br.submit()
print br.title()
Partager