Advertisement
metalx1000

iconosquare photo grabber

Jul 22nd, 2014
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.87 KB | None | 0 0
  1. #!/bin/bash        
  2. #title           :iconosquare photo grabber
  3. #description     :Script will ask you for a word/phrase to search and then
  4. #         pull all photos with that as a tag.
  5. #author      :Kris Occhipinti
  6. #date            :2014-07-22
  7. #version         :0.1    
  8. #Site        :http://filmsbykris.com
  9. #License     :GPLv3 http://www.gnu.org/licenses/gpl-3.0.txt
  10. #==============================================================================
  11.  
  12. url="http://iconosquare.com/controller_nl.php?action=nlGetMethod&method=mediasTag&value="
  13.  
  14. echo "Please enter a search term [example, 'linux']:"
  15. read tag
  16.  
  17. echo "Grabbing images tagged as $tag"
  18. mkdir "photos_$tag"
  19. cd "photos_$tag"
  20.  
  21. wget -q "${url}${tag}" -O-|\
  22.     sed 's/http/\nhttp/g'|\
  23.     grep http|grep '_n.jpg'|\
  24.     cut -d\" -f1|\
  25.     sort -u|\
  26.     sed 's/\\//g'|\
  27.     while read line;
  28.     do
  29.         wget -c "$line"
  30.     done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement