I am a newbie to coding at all. Is there a way to collect a random sample of followers of a certain User? So a random sampIe of 100 followers of that User? I think now I am scraping the followers which followed the certain account recently.
def scrape_user_followers(username):
followers_scraped = []
user = api.get_user(username)
for i, _id in enumerate(tweepy.Cursor(api.followers_ids, screen_name = username).items(100)):
followers_scraped.append(_id)
return followers_scraped
Aucun commentaire:
Enregistrer un commentaire