Created
January 3, 2018 20:36
-
-
Save dhyegocalota/c3487b82d68f31e56b841e6beee7050d to your computer and use it in GitHub Desktop.
[Febraban] Export banks from http://www.febraban.org.br/associados/utilitarios/Bancos.asp?ordem=banco&conglomerado=&origem=&natural=&porte=
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
console.log(JSON.stringify(Object.values(Array.from(document.querySelectorAll('table:nth-child(2) tbody tr')).filter((x, i) => i > 2).map(x => ({ code: x.querySelector('td:nth-child(1)').innerText.trim(), name: x.querySelector('td:nth-child(2)').innerText.trim() })).filter(x => x.code.length).reduce((acc, x) => { acc[x.code] = x; return acc }, {})), null, 2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment