Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !/usr/bin/env bash
- test_album="http://imgur.com/a/SRkmI"
- test_album2="http://imgur.com/a/S2NNI"
- #album=$1
- album=$test_album2
- echo $album
- # Complicated at first, but not difficult at all
- title=`curl -s $album | grep "</title>" | sed 's/ - Imgur<\/title>//' | sed 's/ //g' | sed 's/ /_/g' | sed 's/[,\{\/]//g'`
- echo $title
- # bullshit because unzip doesn't support stdin
- mkdir "$title" ; curl "${album}/zip" > "${title}.zip" ; unzip -d${title}./ "$title.zip" ; # rm "$title.zip"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement