Skip to content

Instantly share code, notes, and snippets.

@davatron5000
Created January 11, 2024 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davatron5000/010c942da8cc99f220a96bf8e8367cdc to your computer and use it in GitHub Desktop.
Save davatron5000/010c942da8cc99f220a96bf8e8367cdc to your computer and use it in GitHub Desktop.
fueleconomy.gov scraper
$$('.mpgSummary:not(.ev) .context').map(mpg => parseInt(mpg.nextSibling.textContent))
.reduce((acc,curr) => acc + curr, 0) / $$('.mpgSummary:not(.ev) .context').length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment