Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get the current number of triple doubles by player (NBA)
# Data via
# Requires curl, pup, and jq
# Steps:
# 1. Download the html
# 2. Parse the html
# 3. Filter out the empty/zero rows
# 4. Parse out just the player names and triple double counts
curl -Ss "" \
| pup '#my-players-table .tablehead tr json{}' \
| jq 'map(select((.children[-1].text != null) and (.children[-1].text | tonumber > 0)))' \
| jq '[.[] | [.children[1].children[0].text, .children[-1].text]]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.