Don't like ads? PRO users don't see any ads ;-)
Guest

Imgur Album Downloader, Linux-Ninjas.com

By: a guest on May 31st, 2012  |  syntax: Bash  |  size: 0.59 KB  |  hits: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash  
  2.  #----------  
  3.  #Imgur Album Downloader v0.1 \ www.Linux-Ninjas.com
  4.  #----------  
  5.  function albumtemp()  
  6.  {  
  7.  if [ -e .albumtemp ]; then  
  8.      rm .albumtemp  
  9.  fi  
  10.  }  
  11.  #Check for url + albumtemp  
  12.  if [ $# == "" ]; then  
  13.      echo -n "Url:"  
  14.      read url  
  15.      albumtemp  
  16.  else  
  17.      url="$1"  
  18.      albumtemp  
  19.  fi  
  20.  #echo "url: $url"  
  21.  if [ "$url" == "" ]; then  
  22.      echo "You need to enter a url!"  
  23.  else  
  24.      curl $url -o .albumtemp  
  25.      cat .albumtemp | grep _blank | awk '{print $2}' | cut -d \" -f 2 | xargs wget  
  26.      albumtemp  
  27.  fi