Forked from lukaszx0/humble-bundle-download-all.sh
Created
November 27, 2016 02:58
-
-
Save HaiNguyen007/de7649cb97f4a43c993e384bd1b337a7 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
# Usage: | |
# 1) Ctr+S downloads page to ~/Desktop/books.html | |
# 2) Run script | |
# 3) Find your books in /tmp/humble_books | |
# 4) Read them | |
# 5) Profit | |
cat ~/Desktop/books.html | grep "https://dl.humble.com" | sed -n -E 's/.data-web\=\"(https://dl.humble.com/([.]+).([a-z]+)?["]+)./\1 \2 \3/p' | sed 's/&/&/g' > /tmp/humble_books_list && cat /tmp/humble_books_list | awk '{print $2}' | uniq | xargs -I"{}" mkdir -p /tmp/humble_books/{} && cat /tmp/humble_books_list | awk '{print "curl -o /tmp/humble_books/" $2 "/" $2 "." $3 " \"" $1 "\"" }' | while read line; do eval $line; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment