Last active
February 27, 2025 14:30
-
-
Save peterhellberg/bcf2a20b409e336419752d77b7c3a07e to your computer and use it in GitHub Desktop.
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
function dl(n) { | |
setTimeout(function(){ | |
document.querySelector('span[class^="Notification-module_close__"]').click(); | |
}, 500); | |
var more = document.querySelectorAll('div[class^="Dropdown-module_container__"]'); | |
more[n].click(); | |
more[n].querySelector('div[id^="DOWNLOAD_AND_TRANSFER_ACTION_"]').click(); | |
more[n].querySelector('label[class^="RadioButton-module_radio_container__"] input').click(); | |
more[n].querySelector('div[id^="DOWNLOAD_AND_TRANSFER_ACTION_"][id$="_CONFIRM"]').click(); | |
}; |
Important
This code is no longer relevant since Amazon has removed the download functionality.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Warning
This function will fail for any
Sample
books Amazon has added to your library. π€¦Instructions
dl(0);
for the first book,dl(1);
for the second, and so on. (could probably be put in a loop...)