Created
May 8, 2019 23:54
-
-
Save FusRoDah061/20d26aea8ce4176e22242fcb25ec43b3 to your computer and use it in GitHub Desktop.
Download all books from https://books.goalkicker.com/. Paste the code on developers console at goalkick homepage
This file contains hidden or 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
| /* | |
| Download all books from https://books.goalkicker.com/ | |
| */ | |
| var a = document.getElementsByClassName('bookContainer'); | |
| a = Array.from(a); | |
| var links = a.map((item) => item.children[0]); | |
| var livros = links.map( | |
| item => { | |
| let sub = item.href + item.href.substring(item.href.indexOf('/', 10)).replace('Book', 'NotesForProfessionals.pdf').trim(); | |
| return sub.substring(0, sub.length - 1); | |
| } | |
| ); | |
| for(let i = 0; i < links.length; i++){ | |
| links[i].href = ""; | |
| links[i].href = livros[i]; | |
| } | |
| for(let i = 0; i < links.length; i++){ | |
| links[i].click(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment