If the website is submitting the form's data using GET
, when you click on submit, you should see the submitted data on your browser's address bar. Something like:
http://www.somesite.com/someform?numbers=1
If that is the case, you can run the command in a for loop:
Install wget for windows.
Modify (change the paths according to your needs) and run this command:
FOR /L %i IN (1,1,100) DO ("C:\Program Files\GnuWin32\bin\wget.exe" --output-document "C:\Users\SomeUserName\SomeDir\%i.html" http://www.somesite.com/someform?numbers=%i)
EXPLANATION:
The for loop has this format: (start,step,end)
. So, the loop above will go through all the numbers from 1 to 100 in increments of 1. At each iteration, it will set the value of variable %i
to the current number.
Wget will download a webpage from a given URL. Using the address from the previous step, it will replace the number in numbers=1
with each of the numbers from 1 to 100, download the corresponding webpage and save it as "number".html in the directory C:\Users\SomeUserName\SomeDir\%i.html
.
If you need more help, please post the URL of the website form you will be using.
Thank you, but the website is using POST not the GET. So do you have another solution? – Matop79 – 2012-09-23T17:08:48.067
@Matop79, Can you give us the URL? – terdon – 2012-09-23T17:24:40.500
http://nahlizenidokn.cuzk.cz/VyberBudovu.aspx?typ=Stavba "Vyhledat" is a Submit button and "Číslo stavby" is a text field where the number goes. And as the "Název/kód obce:" choose Ostrava – Matop79 – 2012-09-23T17:28:06.497
@Matop79, sorry, no ideas... – terdon – 2012-09-23T18:24:09.300