Last active
March 14, 2019 02:25
-
-
Save loraxx753/a8b89023804a6c1e79426eb7f511d0b0 to your computer and use it in GitHub Desktop.
Go to this page https://en.wikipedia.org/wiki/Electron, open the console, paste this in
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
(function() { | |
console.clear() | |
const response = {} | |
const values = [ ...document.querySelectorAll('.infobox td') ].slice(1).map(el => el.innerText) | |
;[ ...document.querySelectorAll('.infobox th') ].map(el => el.innerText).map(keyText => { | |
response[keyText.replace(/\s/g, '_').toLowerCase()] = values.shift() | |
}) | |
return { ...response} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment