Created
December 5, 2017 03:35
-
-
Save ILiedAboutCake/65c6834c0bd08b7ac2b1a64e1f99648a to your computer and use it in GitHub Desktop.
Download Discord Emotes
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 requests | |
GUILD = "265256381437706240" | |
discordHeaders = {'Authorization':''} | |
req = requests.get("https://discordapp.com/api/v6/guilds/"+GUILD+"/emojis", headers=discordHeaders) | |
memes = req.json() | |
for meme in memes: | |
print(meme['name']) | |
imgreq = requests.get("https://cdn.discordapp.com/emojis/"+meme['id']+".png", stream=True) | |
with open(meme['name']+'.png', 'wb') as handle: | |
for block in imgreq.iter_content(1024): | |
handle.write(block) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment