From ed51210bf82b8eecc39bd3163ce31c4a059b99cb Mon Sep 17 00:00:00 2001 From: Robert Dempsey Date: Tue, 14 Mar 2017 18:08:51 -0400 Subject: [PATCH] Update check for the retweeted status portion of the tweet --- traptor/traptor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/traptor/traptor.py b/traptor/traptor.py index b77bcbf..4c438e3 100644 --- a/traptor/traptor.py +++ b/traptor/traptor.py @@ -420,7 +420,7 @@ def _find_rule_matches(self, tweet_dict): query = query + " " + tweet_dict['user']['screen_name'].encode('utf-8') # Retweeted parts - if tweet_dict['retweeted_status']: + if tweet_dict.get('retweeted_status', None) is not None: # Status query = query + " " + tweet_dict['retweeted_status']['text'].encode("utf-8")