Last active
November 5, 2017 20:36
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?