Thanks for the suggestions, I will have a fiddle around.. -- Regards Cliff On Tue, Oct 30, 2001 at 09:13:29AM -0400, James Oakley wrote:
On October 29, 2001 08:35 pm, you wrote:
Cliff,
What I've done in the past is put all the info in the URL so that page is retrieved using GET instead of POST.
For example,
The input page is http://www.xyzcorp.com/form.html
On the page there are 2 text boxes and a dropdown list called as follows
txtA txtB lstA
The form action = forminput.html
So what I do is navigate to http://www.xyzcorp.com/forminput.html?txtA=1&txtB=2&lstA=Sponge where I want A, B, and Sponge as my selections on the form.
That should work for you for the most part. Some pages may try to stop you from making that work but that is definitely the quickest way around navigating to the form.
I'd like to add the usage of curl here, in case you need to do a POST. curl's a great tool anyway.
Take the data above and call the following command:
curl http://www.xyzcorp.com/forminput.html -d txtA=1 -d txtB=2 -d lstA=Sponge
That's for those pages that don't like GET requests. The really cool part is that if the page requires a cookie, you can give it one using the '-b' option (eg: -b 'SESSIONID=IUY6567HGJHG567').
I should probably also mention that whatever method you use, the data must be URL encoded. This means that spaces are replaced with '%20's and so on. Python's urllib.urlencode() can do this for you for any data.