Closed kiranbhatia16 closed 3 years ago
tweet.mentionedUsers
is a list of snscrape.modules.twitter.User
objects if there are any mentions in a tweet (None
if not). I don't know what your expected structure is for no/one/multiple mentions, but you'll want to add something like this:
if tweet.mentionedUsers:
for user in tweet.mentionedUsers:
# Do something with user.username
And as you might suspect, tweet.user
is the user that posted the tweet.
I am very new to python and I am a little confused. I am working with this script:
I want to include mentioned users in the tweets in this script so that I can have a source and target column for social network analysis. What should I do?