2

check the following script:

from mechanize import Browser

br = Browser()
page = br.open('http://scottishladiespool.com/register.php')

br.select_form(nr = 5)

r = br.click(type = "submit", nr = 0)
print r.data
#prints username=&password1=&password2=&email=&user_hide_email=1&captcha_code=&user_msn=&user_yahoo=&user_web=&user_location=&user_month=&user_day=&user_year=&user_sig=

that is, it doesn't add the name=value pair of the submit button (register=Register). Why is this happening? ClientForm is working properly on other pages, but on this one it is not. I've tried setting the disabled and readonly attributes of submit control to True, but it didn't solve the problem.

1 Answer 1

2

There is a disabled=disabled attribute on the register button. This prevents the user from clicking and presumably mechanize respects the disabled attribute as well.

You'll need to change the source code of that button. Enabling the control means completely removing the disabled=disabled text.

Sign up to request clarification or add additional context in comments.

2 Comments

Weird, I've tried it before sending the question and it didn't work, now it does)
Heh - trust me we've all been there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.