From 5bd4b909bc1e259a14b5109bcf08baccfe42a26c Mon Sep 17 00:00:00 2001 From: Igor Brigadir Date: Tue, 14 Dec 2021 20:49:57 +0000 Subject: [PATCH] fix #143 geo expansion. Check to see if a tweet contains exact geo point without a place id. --- searchtweets/result_stream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searchtweets/result_stream.py b/searchtweets/result_stream.py index 41cf943..c48b54b 100644 --- a/searchtweets/result_stream.py +++ b/searchtweets/result_stream.py @@ -266,7 +266,7 @@ def expand_payload(payload): poll_id = payload["poll_ids"][-1] # always 1, only 1 poll per tweet. payload["poll"] = includes_polls[poll_id] - if "geo" in payload: + if "geo" in payload and "place_id" in payload["geo"]: place_id = payload["geo"]['place_id'] payload["geo"] = merge_dicts(payload["geo"], includes_places[place_id])