Created
September 10, 2018 06:24
-
-
Save tehp/1649cc37f7d0105f7ba1ca7644fa21a9 to your computer and use it in GitHub Desktop.
Download all twitch global emotes and name them lower case for slack
This file contains 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
import urllib | |
import os | |
import json | |
if not os.path.exists('./emotes'): | |
os.makedirs('./emotes') | |
print('folder: ' + os.path.abspath('./emotes') + '...') | |
emotes = json.load(urllib.urlopen('https://twitchemotes.com/api_cache/v3/global.json')) | |
for code, emote in emotes.items(): | |
print('dl: ' + code + '...') | |
urllib.urlretrieve('https://static-cdn.jtvnw.net/emoticons/v1/' + str(emote['id']) + '/3.0', './emotes/' + code.lower() + '.0') | |
print('done') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment