使用python mechanize </noscripts>在<noscripts>标签内填写textarea

时间:2011-08-29 14:23:21

标签: python textarea screen-scraping mechanize

我遇到机械化从标签内注册文本区域字段的问题。

示例网址:http://www.gegononta.gr/register.php

代码:

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

输出:

<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>)>
<PasswordControl(reg_password=)>
<PasswordControl(reg_password2=)>
<HiddenControl(recaptcha_response_field=manual_challenge)>
<SubmitControl(submit=Create user)>
<HiddenControl(regfrom=full)>>

如何填写以下字段?

<textarea cols="40" rows="3" name="recaptcha_challenge_field"></textarea>

1 个答案:

答案 0 :(得分:0)

<textarea cols="40" rows="3" name="recaptcha_challenge_field"></textarea>

实际上不是机械化可以填写的字段。