beating a dead horse: automated form submission

Peter Hansen peter at engcorp.com
Tue Jan 28 19:09:38 EST 2003


Whit Whitfield wrote:
> 
> Ok, so I at least got past step 1 -- apparently my WinPython was setup
> incorrectly because the code snippet above worked in Idle and on my
> unix version of Python also.  (I assume that getting '200 OK' back
> from musical
> means it worked.
> Now my only question is this:  I've scoped out the forms that I need
> to automate and have all the name-data pairs, but do I need to do
> anything special for the Submit button?  Or does posting the data
> automatically start the server-side onSubmit actions?  Thanks for your
> help everyone!

It's up to the receiving server what is done with the Submit button
information.  In many cases, it is checked to see that it equals the
value specified in the form, and without that the input is not processed.
Basically, since you can't be sure, you should either test it (and if
you don't need it, then you don't need it), or just look in the form
and make sure you include a key/value pair in your data that matches
whatever the Submit button would actually do.

-Peter




More information about the Python-list mailing list