Skip to content

Instantly share code, notes, and snippets.

@JasonMillward
Last active November 5, 2017 20:36
Show Gist options
  • Save JasonMillward/4680299 to your computer and use it in GitHub Desktop.
Save JasonMillward/4680299 to your computer and use it in GitHub Desktop.
Download imgur.com galleries easily. This snippet downloads the latest 100 pages of images in the wallpaper gallery.
#!/bin/bash
for ((i = 0; i <= 100; i++)); do
echo "Grabbing page $i"
wget -q "http://imgur.com/r/wallpapers/page/$i" -O - | grep 'class="post"' | cut -d\" -f2 | while read id
do
echo "Downloading $id.jpg"
wget -q -c "http://i.imgur.com/$id.jpg"
done
done
echo "Done"
Copy link

ghost commented Nov 25, 2015

Hello,

I am trying to use this to download the following images from the album, but can't seem to get it to work: http://imgur.com/a/s1tJR

The script runs and downloads 100 pages, but it's the same images on each of those pages. Doesn't seem to be cycling through them. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment