Fill in textarea within <noscripts> tags with python mechanize
I'm having a problem with mechanize registering a text area field from within a tag.
Example URL: http://www.gegononta.gr/register.php
Code:
mech = mechanize.Browser()
url = "http://www.gegononta.gr/register.php"
response = mech.open(url)
mech.select_form(nr=1)
mech.form.set_all_readonly(False)
print mech.form
Output:
<POST http://www.gegononta.gr/register.php application/x-www-form-urlencoded
<TextControl(reg_username=)>
<IgnoreControl(reg-checkbutton1=<None>)>
<TextControl(reg_email=)>
<IgnoreControl(reg-checkbutton2=<None>)>
<Pa开发者_如何学PythonsswordControl(reg_password=)>
<PasswordControl(reg_password2=)>
<HiddenControl(recaptcha_response_field=manual_challenge)>
<SubmitControl(submit=Create user)>
<HiddenControl(regfrom=full)>>
How can I fill in the following field?
<textarea cols="40" rows="3" name="recaptcha_challenge_field"></textarea>
<textarea cols="40" rows="3" name="recaptcha_challenge_field"></textarea>
is actually not a field that mechanize can fill out.
精彩评论