2

When I try to pull all the jpegs off of this website (http://www.zodiackillerfacts.com/gallery/) using wget:

wget -A jpg,jpeg -r http://www.zodiackillerfacts.com/gallery/

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.

1 Answer 1

1

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:

#!/bin/bash

wget -qO - "http://www.zodiackillerfacts.com/gallery/" | \
 egrep -o 'thumbnails\.php\?album=[0-9]+' | \
  sort -u | \
    while read gallery
    do
      wget -O "/tmp/$$" "http://www.zodiackillerfacts.com/gallery/$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="!http://www.zodiackillerfacts.com/gallery/!' | \
        wget -i -
      cd ..
      rm "/tmp/$$"
    done

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.

You must log in to answer this question.

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