Last active
September 9, 2019 12:14
-
-
Save ttor/66d7bc84036568e77b36e9c711c66788 to your computer and use it in GitHub Desktop.
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 | |
# This scripts downloads images from flickr from a search results page (flickr.html). | |
# Sketch to generate flickr.html (in Chrome): | |
# Search on flickr, select Creative Commons commercial use | |
# Change tiling to second choice (or adapt "_n" in the processing below) | |
# In Inspector (ctrl-shift-I), select top <html> element, right-click: copy element | |
# Paste into flickr.html | |
# grep image references | |
cat flickr.html |grep -e '//c.*_n\.jpg' -o > flickr.out | |
# change resolution to 640xY | |
perl -pi -e 's/_n/_z/g' flickr.out | |
# download | |
for i in `cat flickr.out`; do wget http:$i; done | |
# cleanup | |
rm flickr.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment