Last active
August 12, 2021 20:47
-
-
Save alandooz/f2da8475c3997f75b67e9d03dfb57145 to your computer and use it in GitHub Desktop.
format CSV
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
let books = [...document.querySelector('#g-items').querySelectorAll("li")].map(element => { let el = element.querySelector("[id^='itemName_']"); let author = element.querySelector("[id^='item-byline-']"); return [`"${el.title} by ${author.innerText}"`,el.origin+el.pathname.replace('-/es/','')]}).map(d => d.join()).join('\n'); | |
console.log(books) | |
Copy and paste | |
Put "title,url" at the first line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment