1
twich.tv emotes를 다운로드해야합니다. Phyton 스크립트를 찾았지만 작동하지 않습니다. 스크립트를 쓴 사람이 Twich 그래 난 더 이상 그 API의 일을 생각하지 않는다 page with API docAPI를 통해 twich 감정을 얻는 방법 ??
import urllib
import os
import json
if not os.path.exists('./emotes'):
os.makedirs('./emotes')
print('Saving emotes to folder: ' + os.path.abspath('./emotes') + '...')
print('Grabbing emote list...')
emotes = json.load(urllib.urlopen('https://twitchemotes.com/api_cache/v2/global.json'))
for code, emote in emotes['emotes'].items():
print('Downloading: ' + code + '...')
urllib.urlretrieve('http:' + emotes['template']['large'].replace('{image_id}', str(emote['image_id'])),
'./emotes/' + code + '.png')
print('Done! Kappa')