Skip to content

Instantly share code, notes, and snippets.

@wis
Created March 5, 2019 03:08
Show Gist options
  • Save wis/b4ecdb8faf2afdc1c0cb7cbc142cd0cf to your computer and use it in GitHub Desktop.
Save wis/b4ecdb8faf2afdc1c0cb7cbc142cd0cf to your computer and use it in GitHub Desktop.
scrape emojistats.org
var data = [...document.querySelectorAll('#emojilist-wrapper > ul > li')].
map(e => [...e.attributes].find(a => a.name.startsWith('data-count'))).
map(a => ({"hex": a.name.replace('data-count',""),
"dayssincereleased": a.ownerElement.attributes['data-dayssincereleased'].nodeValue,
"currentcount": a.ownerElement.attributes['data-currentcount'].nodeValue,
"dailycount": a.ownerElement.attributes['data-dailycount'].nodeValue
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment