Skip to content

Instantly share code, notes, and snippets.

@nrm176
Last active August 20, 2020 08:29
Show Gist options
  • Save nrm176/0756d1697ecf896425d88556027bd135 to your computer and use it in GitHub Desktop.
Save nrm176/0756d1697ecf896425d88556027bd135 to your computer and use it in GitHub Desktop.
Array.from(document.querySelectorAll('div table table td[width="570"] table:nth-child(11)')[0]
    .querySelector('tr table')
    .querySelectorAll('tr')).filter((e, idx) => {
    return idx != 0
}).map((e) => {
    return e.querySelector('td:nth-child(8)').textContent
        .replace('(--)', '')
        .replace(',', '')
        .replace("--", "0")
}).map((e) => {
    return parseInt(e)
}).reduce((c, p) => {
    return c + p
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment