Fabian
Fabian

Reputation: 51

Scraping Tweets with rtweet from a specific language results ins empty data frame

I just discovered rtweet and I want to get some tweets from a specific language. I tried things like:

library(rtweet)
search_tweets("corona","lang:en",n=100,type="popular",include_rts=TRUE)

But this results in data frame with 0 columns and 0 rows. But this cannot be right. There have to be some tweets about corona recently. Or am I doing something wrong here?

I also tried to recreate examples I found (e.g., this one: https://corpling.hypotheses.org/153), but I wasn't able to do so because I always end up with empty data frames.

I would be happy about suggestions :)

Upvotes: 0

Views: 139

Answers (1)

Prathit
Prathit

Reputation: 87

library(rtweet)
library(tidyverse)
tweets <- search_tweets("corona", n = 1000, include_rts = FALSE, lang = "en")
glimpse(tweets)

This should work....

Upvotes: 2

Related Questions