Closed ehannell closed 4 years ago
Yes, there's an error in your code - the query_tweets
function doesn't take a user
argument. Instead, you could put the desired username in your query string:
tweets = query_tweets('from:usernamehere', begindate='2019,1,1', enddate='2020,1,1', limit=1000, lang='english')
Yes, there's an error in your code - the
query_tweets
function doesn't take auser
argument. Instead, you could put the desired username in your query string:tweets = query_tweets('from:usernamehere', begindate='2019,1,1', enddate='2020,1,1', limit=1000, lang='english')
Perfect! Thanks a lot
I also got the error message when I try to get tweets with user profiles. How can it be fixed?
Error code: TypeError: query_tweets() got an unexpected keyword argument 'profiles'
I also got the error message when I try to get tweets with user profiles. How can it be fixed?
Error code: TypeError: query_tweets() got an unexpected keyword argument 'profiles'
dspencer12's solution above worked for me.
To get tweets from a certain profile do: query_tweets('from:profilename', ....)
That works for me too:) Instead of a single user's profile, I am looking for the profile information of users from a queried list of tweets. Like the mentioned section in README.rst :
2.5 Scraping for User Profile information By adding the argument --profiles twitterscraper will in addition to the tweets, also scrape for the profile information of the users who have written these tweets. The results will be saved in the file "userprofiles_
".
I am trying to get tweets from a specific user, but my Python-code won't return any tweets. Is there an error in my code?
Example:
tweets = query_tweets(user='usernamehere', begindate='2019,1,1', enddate='2020,1,1', limit=1000, lang='english')