Created
January 3, 2018 16:10
-
-
Save mawalu/46f86b6ea641b5fb8aa4f2fa3d9f5151 to your computer and use it in GitHub Desktop.
Download Humble Bundle books / videos
This file contains 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
// Enter into your console while on the download page | |
// idea from: https://gist.github.com/graymouser/a33fbb75f94f08af7e36 | |
let b = [] | |
$('a').each(function(i){ | |
if ($.trim($(this).text()) == 'PDF') { // change to MOBI, Download, EPUB depending on the button text | |
b.push(this.href) | |
} | |
}); | |
console.log(JSON.stringify(b)) | |
// copy the output into your clipboard |
This file contains 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
# Execute in your download folder | |
# --content-disposition should fix the filenames of the downloaded files | |
echo 'STRING_FROM_BROWSER_CONSOLE' | jq ".[]" | xargs -n1 wget --content-disposition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment