Skip to content

Instantly share code, notes, and snippets.

@tehp
Created September 10, 2018 06:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tehp/1649cc37f7d0105f7ba1ca7644fa21a9 to your computer and use it in GitHub Desktop.
Save tehp/1649cc37f7d0105f7ba1ca7644fa21a9 to your computer and use it in GitHub Desktop.
Download all twitch global emotes and name them lower case for slack
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