I occasionally have to give a system I use a kick. I do this by using lynx that calls up a web page where I have to fill in 3 fields and then select an option. The fields always have the same value, and I always choose the same option. A small amount of navigation in the form is required, but there are no jumps to other hyperlinks. Does some wizard out there know how I can call this page up and have it automatically filled in somehow ? The page is not on my network btw. -- Regards Cliff
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. Please feel free to ask for clarification if any of this is a little muddy. John W Higgins john@wishdev.com -----Original Message----- From: Cliff Sarginson [mailto:cliff@raggedclown.net] Sent: Monday, October 29, 2001 4:00 PM To: suse-linux-e@suse.com Subject: [SLE] OT, filling in a form with lynx I occasionally have to give a system I use a kick. I do this by using lynx that calls up a web page where I have to fill in 3 fields and then select an option. The fields always have the same value, and I always choose the same option. A small amount of navigation in the form is required, but there are no jumps to other hyperlinks. Does some wizard out there know how I can call this page up and have it automatically filled in somehow ? The page is not on my network btw. -- Regards Cliff -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
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. -- James Oakley Engineering - SolutionInc Ltd. joakley@solutioninc.com http://www.solutioninc.com
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.
participants (3)
-
Cliff Sarginson
-
James Oakley
-
John W Higgins