-
-
Save qwo/705924a39f737e94de884a87c616328b to your computer and use it in GitHub Desktop.
Scrape all emojis with descriptions from unicode.org/emoji/charts website
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*TODO Remove Tag when Done */ | |
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var fs = require('fs'); | |
console.log('retrieving unicode table...'); | |
request.get('http://unicode.org/emoji/charts/full-emoji-list.html', function (err, response, body) { | |
console.log('loading data...'); | |
var $ = cheerio.load(body); | |
var emoji = $('td.chars').map(function () { | |
return $(this).text(); | |
}).toArray(); | |
console.log('writing file...'); | |
fs.writeFile('./emoji.json', JSON.stringify(emoji, null, 2), function (err) { | |
console.log('done'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment