Skip to content

Instantly share code, notes, and snippets.

@bbucommander
Created May 1, 2011 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbucommander/950840 to your computer and use it in GitHub Desktop.
Save bbucommander/950840 to your computer and use it in GitHub Desktop.
Download Wikimedia Image and Wallpaper Galleries
' Automated downloading of Wikimedia image and wallpaper galleries
' by Jesse Johnson
' I, Jesse Johnson, hereby release this work to the public domain.
'
' To use the script, first change the ONDOWNLOAD line so that FOLDER=/your/folder/
' Next, navigate your browser to a Wikimedia image gallery and run the script as a loop
' for a max = # of images using the iMacros browser addon.
'
VERSION BUILD=7200328
TAB T=1
' Uncomment and set to # of last image saved if there is a problem that stops the script from finishing.
'SET !LOOP 2
' Navigate to *.jpg files.
TAG POS={{!loop}} TYPE=IMG ATTR=HREF:http://*.jpg
' Open full res. image.
TAG POS=1 TYPE=A ATTR=TXT:"*Full resolution*"
' Save full res. image. <<PLEASE SET IMAGE DOWNLOAD FOLDER!>>
ONDOWNLOAD FOLDER=/your/folder/ FILE=+
TAG POS=1 TYPE=IMG ATTR=HREF:http://*.jpg CONTENT=EVENT:SAVEITEM
' Courtesy wait so as to not overload the server.
WAIT SECONDS=3
' Return to gallery.
BACK
BACK
' loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment