[O] Only get 500 top accounts
This commit is contained in:
+4
-4
@@ -21,13 +21,13 @@ if __name__ == '__main__':
|
|||||||
#####################
|
#####################
|
||||||
# Data processing - Step P1
|
# Data processing - Step P1
|
||||||
# (After step C1) Process the downloaded twitter users by popularity
|
# (After step C1) Process the downloaded twitter users by popularity
|
||||||
# process_users_popularity()
|
process_users_popularity()
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
# Data collection - Step C2
|
# Data collection - Step C2
|
||||||
# (After step P1) Load the downloaded twitter users by popularity, and start downloading as many
|
# (After step P1) Load the downloaded twitter users by popularity, and start downloading all
|
||||||
# tweets from these users as possible.
|
# tweets from 500 of the most popular users.
|
||||||
# users = load_users_popularity()
|
# users = load_users_popularity()[:500]
|
||||||
|
|
||||||
# Just curious, who are the 20 most popular individuals on twitter?
|
# Just curious, who are the 20 most popular individuals on twitter?
|
||||||
# print(tabulate(((u.username, u.popularity) for u in users[:20]),
|
# print(tabulate(((u.username, u.popularity) for u in users[:20]),
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if __name__ == '__main__':
|
|||||||
conf = load_config()
|
conf = load_config()
|
||||||
api = tweepy_login(conf)
|
api = tweepy_login(conf)
|
||||||
|
|
||||||
users = load_users_popularity()
|
users = load_users_popularity()[:500]
|
||||||
|
|
||||||
# Just curious, who are the 20 most popular individuals on twitter?
|
# 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']))
|
print(tabulate(((u.username, u.popularity) for u in users[:20]), headers=['Name', 'Followers']))
|
||||||
|
|||||||
Reference in New Issue
Block a user