Reputation: 992
This wont be easy to answer so I would like some guide instead: I want to download images form a webserver. I know how to get an image from a url, but i dont know how many pages I can find. (example, chapter 01 has 21 images, chapter 02 only 12...)
There is a combo box (DropdownChoice) on the webpage that tells how many pages are of that chapter. Is there a way I can get that info?
if I get to know that, i can do a for from page 1 to page x and download every image.
fyi I am using python
Thanks!
Upvotes: 0
Views: 929
Reputation: 1699
This project in python downloads a number of images from a website pre-defined by the user. I'm sure you can change it to suit your needs.
Upvotes: 1
Reputation: 179392
As a quick hack, you could just download sequential pages until you get a 404 (or some other error). This isn't generally considered "nice", so use it with caution, but it will allow you to download all of the images easily.
Alternately, you can look at using the Scrapy package to help you download and parse webpages and images.
Upvotes: 2