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.

Revisions

  1. Wis created this gist Mar 5, 2019.
    7 changes: 7 additions & 0 deletions scrape-emoji-stats.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    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
    }));