Created
April 29, 2023 14:05
-
-
Save celia-vytrac/d63fcab8df96e9c1b1cc863475c49743 to your computer and use it in GitHub Desktop.
Run in google chrome -> inspect element -> source -> snippets at https://play.google.com/books to download all books on page as EPUB rather than doing it manually one at a time.
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 sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
let dots = document.querySelectorAll("[aria-label=\"More Options\"]") | |
for (let button of dots) { | |
button.click() | |
let exp = document.getElementById("overflow-export-ebook") | |
exp.click() | |
await sleep(1000); | |
let epub = document.querySelector("[cdkfocusinitial]") | |
epub.click() | |
await sleep(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment