-
-
Save sanjacob/a0ccdf6d88f15bf158d8895090722d14 to your computer and use it in GitHub Desktop.
# Copyright (C) 2024 by sanjacob | |
# Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING | |
# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, | |
# DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | |
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE | |
# OR PERFORMANCE OF THIS SOFTWARE. | |
""" | |
Download all animated emojis from Google Noto Emoji | |
""" | |
import requests | |
def get_emoji_list(): | |
emojis = [] | |
r = requests.get('https://googlefonts.github.io/noto-emoji-animation/data/api.json') | |
for icon in r.json()['icons']: | |
name = icon['tags'][0][1:-1] | |
emojis.append((icon['codepoint'], name)) | |
return emojis | |
def download_emoji(code, name): | |
r = requests.get(f'https://fonts.gstatic.com/s/e/notoemoji/latest/{code}/lottie.json') | |
r.raise_for_status() | |
with open(f'{name}.json', 'wb') as f: | |
f.write(r.content) | |
def main(): | |
emojis = get_emoji_list() | |
for code, name in emojis: | |
print(f'downloading {name} ({code})') | |
try: | |
download_emoji(code, name) | |
except requests.RequestException: | |
print(f'could not get emoji {name}') | |
pass | |
if __name__ == '__main__': | |
raise SystemExit(main()) |
감사합니다!
Can anybody tell me how can I download the whole animated Noto emojis with this code? I know nothing about python and coding. I just downbloaded python and copy this codes into NP++ file and save that as "download.py" and I did run this file but nothing happend.
Can anybody tell me how can I download the whole animated Noto emojis with this code? I know nothing about python and coding. I just downbloaded python and copy this codes into NP++ file and save that as "download.py" and I did run this file but nothing happend.
I also don't know anything about coding but i paste the code and ask chat gpt whats next, u need to do few things like save it that code as file and run it via python. Chat gpt will help you
chat gpt
Thanks, I downloaded by the help of ChatGPT.
I love you bro! Works really well, Thank you for sharing!