Skip to content

Instantly share code, notes, and snippets.

@celia-vytrac
Created April 29, 2023 14:05
Show Gist options
  • Save celia-vytrac/d63fcab8df96e9c1b1cc863475c49743 to your computer and use it in GitHub Desktop.
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.
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