From 41bc559691b25b89a7905ddbef261578dc2eb598 Mon Sep 17 00:00:00 2001 From: JJ Brosnan <84038776+jjbrosnan@users.noreply.github.com> Date: Fri, 26 Aug 2022 08:34:36 -0400 Subject: [PATCH] Remove globals reference for variable inside function --- data/notebooks/pull_tweets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/notebooks/pull_tweets.py b/data/notebooks/pull_tweets.py index 4858d3c..4e3b9ea 100644 --- a/data/notebooks/pull_tweets.py +++ b/data/notebooks/pull_tweets.py @@ -85,7 +85,7 @@ def write_data(all_text, tableWriter): id = int(t['id']) #if there is a newer Id save that as the new max_id, so tweets are only pulled once each if max_id < float(t['id']): - globals()['max_id'] = int(t['id']) + max_id = int(t['id']) dateTime = t['created_at'][:-1]+" NY" retweet_count = t['public_metrics']['retweet_count'] reply_count = t['public_metrics']['reply_count']