Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to pull all the jpegs off of this website ( using wget:

wget -A jpg,jpeg -r

it only downloads the thumbnails. How would I be able to download the full size jpegs by using wget instead of going through all 1000 pictures one by one and clicking all of them? These pictures are all in different "albums" on the site.

share|improve this question

You are going to need a script which parses the gallery pages and then uses wget. For this particular site the script can be pretty straight forward, something like this:


wget -qO - "" | \
 egrep -o 'thumbnails\.php\?album=[0-9]+' | \
  sort -u | \
    while read gallery
      wget -O "/tmp/$$" "$gallery"
      album=$(egrep -m1 -o '<title>[^<]+' /tmp/$$ | \
               sed -e 's/^<title>//' -e 's/[^a-zA-Z0-9 :-()]//g')
      mkdir "$album" || continue
      cd "$album"
      egrep -o 'src="albums/[^"]*' "/tmp/$$" | \
       sed -e 's/thumb_//' \
           -e 's!^src="!!' | \
        wget -i -
      cd ..
      rm "/tmp/$$"

Here, we fetch the HTML of the first page, parse out the gallery links, fetch the HTML for each gallery, make a directory for it and fetch all the images. Not very pretty or robust, but it seems to do the job.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .