Skip to content

Instantly share code, notes, and snippets.

@etuchscherer
Created March 24, 2014 20:48
Show Gist options
  • Save etuchscherer/9748842 to your computer and use it in GitHub Desktop.
Save etuchscherer/9748842 to your computer and use it in GitHub Desktop.
Use to quickly scrape a list of images
#!/bin/bash
# Useage
# ./scrape list
#
# list must be a plain text file, containing
# image urls, separated by line.
#
# Example:
# http://www.example.com/foo.jpg
# http://www.example.com/bar.jpg
i=1
while read line
do
i=$((i + 1))
wget $line -O "a${i}.jpg"
done < $1
@etuchscherer
Copy link
Author

TODO: needs to be able to write more than one filetype. Preferably, by detecting the urls extension.

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