diff --git a/get_emojis.py b/get_emojis.py index 771cb95..767b7be 100644 --- a/get_emojis.py +++ b/get_emojis.py @@ -12,10 +12,13 @@ def download_image(url, path): - r = requests.get(url, stream=True) - with open(path, 'wb') as f: - for chunk in r.iter_content(): - f.write(chunk) + try: + r = requests.get(url, stream=True) + with open(path, 'wb') as f: + for chunk in r.iter_content(): + f.write(chunk) + except ValueError: + print "Oops! " + url + " could not get from slack." def reconcile_aliases(image_url, emoji):