rielmvp
#1
Hello.
I am an undergraduate university student trying to scrape Twitter data from the NBA Twitter space and I am unable to apply for Academic Research Access since I don’t fulfill the requirements for it, therefore I only have Elevated Access and can only scrape Tweets from the past 7 days or so, and I have been doing that but I have missed a day on the 25th of October and I cannot scrape Tweets in that date interval again. I was wondering if I could get any help from anyone with an Academic Research level access to run the following code and be able to help me continue my project, since scraping Tweets continuously is a very important part of the project for me.
The code is:
for (i in 1:30){
temptweets=searchTwitteR(searchString = paste(NBAteams[i], "-RT -filter:retweets"),
n=100, lang ="en", since = "2022-10-25", until = '2022-10-26',
resultType = "mixed")
temp = twListToDF(temptweets)
head(temp)
write.csv(temp, file=paste("NBAteamsdf/NBAteams1025df_", NBAteams[i], ".csv", sep = ""))
rm(temp)
}
I wanted to attach the code for the NBAteams vector, which simply contains the tags of each NBA team, but it was not allowed to post it. It should look something like this:
Help or information regarding a workaround would be very much appreciated.
This in the query may not be what you want. -RT -filter:retweets should be -is:retweet
twitterR package is way too old to use v2 API however.
You can paste the full code in if you pick the “preformatted text” format option in the forum.