Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import twint
- # get the followers first
- c = twint.Config()
- c.Username = "C0r0n4CON"
- c.Limit = 10
- c.Store_object = True
- c.User_full = True
- twint.run.Following(c)
- # save them in a list
- target_followers = twint.output.users_list
- # iterate over them and save in a new list
- K_followers = []
- for user in target_followers:
- if user.followers >= 1000:
- K_followers.append(user)
- # now we can save them in an CSV file, for example
- with open('K_followers_coronacon.csv', 'w') as output:
- output.write('id,username,followers, following\n')
- for u in K_followers:
- output.write('{},{},{},{}\n'.format(u.id, u.username, u.followers, u.following))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement