From d7ebb9580b81d6d4d94628d65425a29a002760c2 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Mon, 22 Nov 2021 16:24:45 -0500 Subject: [PATCH] [O] Only get 500 top accounts --- src/main.py | 8 ++++---- src/raw_collect/twitter_individual.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.py b/src/main.py index 09fbb82..af7b9e1 100644 --- a/src/main.py +++ b/src/main.py @@ -21,13 +21,13 @@ if __name__ == '__main__': ##################### # Data processing - Step P1 # (After step C1) Process the downloaded twitter users by popularity - # process_users_popularity() + process_users_popularity() ##################### # Data collection - Step C2 - # (After step P1) Load the downloaded twitter users by popularity, and start downloading as many - # tweets from these users as possible. - # users = load_users_popularity() + # (After step P1) Load the downloaded twitter users by popularity, and start downloading all + # tweets from 500 of the most popular users. + # users = load_users_popularity()[:500] # Just curious, who are the 20 most popular individuals on twitter? # print(tabulate(((u.username, u.popularity) for u in users[:20]), diff --git a/src/raw_collect/twitter_individual.py b/src/raw_collect/twitter_individual.py index d18a2a6..068acbf 100644 --- a/src/raw_collect/twitter_individual.py +++ b/src/raw_collect/twitter_individual.py @@ -9,7 +9,7 @@ if __name__ == '__main__': conf = load_config() api = tweepy_login(conf) - users = load_users_popularity() + users = load_users_popularity()[:500] # Just curious, who are the 20 most popular individuals on twitter? print(tabulate(((u.username, u.popularity) for u in users[:20]), headers=['Name', 'Followers']))