Thanks Hrvoje, using http://.../InventoryStatus.asp?cboSupplier=4541-134289&status=all&action-select=Query in IE worked like a charm. I didn't have to follow links. I am now trying to automate this using wget 1.8.2 (Windows).
There are two steps involved: 1). Log in to the customer's web site. I was able to create the following link after I looked at the <form> section in the "source" as explained to me earlier by Hrvoje. wget http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Locale=English (United States)&TimeZone=(GMT-5:00) Eastern Standard Time (USA & Canada)&action-Submit=Login 2). Execute: wget http://customer.website.com/InventoryStatus.asp?cboSupplier=4541-134289&status=all&action-select=Query I tried different ways to get this working, but so far have been unsuccessful. Any ideas? Thanks, Suhas ----- Original Message ----- From: "Hrvoje Niksic" <[EMAIL PROTECTED]> To: "Suhas Tembe" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, October 07, 2003 6:12 PM Subject: Re: Web page "source" using wget? > "Suhas Tembe" <[EMAIL PROTECTED]> writes: > > > It does look a little complicated.... This is how it looks: > > > > <form action="InventoryStatus.asp" method="post" [...] > [...] > > <select name="cboSupplier"> > > <option value="4541-134289">454A</option> > > <option value="4542-134289" selected>454B</option> > > </select> > > Those are the important parts. It's not hard to submit this form. > With Wget 1.9, you can even use the POST method, e.g.: > > wget http://.../InventoryStatus.asp --post-data \ > 'cboSupplier=4541-134289&status=all&action-select=Query' \ > -O InventoryStatus1.asp > wget http://.../InventoryStatus.asp --post-data \ > 'cboSupplier=4542-134289&status=all&action-select=Query' > -O InventoryStatus2.asp > > It might even work to simply use GET, and retrieve > http://.../InventoryStatus.asp?cboSupplier=4541-134289&status=all&action-select=Query > without the need for `--post-data' or `-O', but that depends on the > ASP script that does the processing. > > The harder part is to automate this process for *any* values in the > drop-down list. You might need to use an intermediary Perl script > that extracts all the <option value="..."> from the HTML source of the > page with the drop-down. Then, from the output of the Perl script, > you call Wget as shown above. > > It's doable, but it takes some work. Unfortunately, I don't know of a > (command-line) tool that would make this easier. >
