Created
October 24, 2019 11:55
-
-
Save lucis/13bd41ef9a9e48bd5d10499651f04dab to your computer and use it in GitHub Desktop.
Exporta alunos de uma página de frequência
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
const exportaAlunos = table=>{ | |
const trs = table.querySelectorAll('tr'); | |
const it = a=>a.innerText; | |
return [...trs].splice(1).map(tr=>{ | |
const matricula = it(tr.children[1]) | |
const nome = it(tr.children[2]) | |
return { | |
nome, | |
matricula | |
} | |
} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment