问题
I would need to keep collecting tweets to live stream data and show insights in Power BI.
I have the following R code to stream tweets continuously. It tries to scrap tweets every 10 seconds. After first 10-14 times, it throws an error:
The stream disconnected prematurely. Reconnecting...
Below is the code:
q <- "maths"
streamtime <- 10
filename <- "test.json"
rt <- stream_tweets(q = q, timeout = streamtime, file_name = filename)
How do I overcome this limitation?
来源:https://stackoverflow.com/questions/53145933/r-twitter-live-streaming-error-the-stream-disconnected-prematurely