diff --git a/commands.py b/commands.py index 05717d0..05ead63 100644 --- a/commands.py +++ b/commands.py @@ -126,7 +126,7 @@ class Commands(object): media = instagram.get_media() media = [m for m in media if [k for k in keywords \ if m['type'] == 'Image' and k.lower() in m['title'].lower()]] - except (InstagramError, IndexError): + except (InstagramError, TypeError, KeyError): return None else: return media