working
This commit is contained in:
@@ -52,7 +52,7 @@ keep <- c("created_at", "id_str", "text", "retweet_count")
|
||||
tweets_full <- data.frame(user=character(), name=character(), created_at=character(), id_str=character(), text=character(), retweet_count=character())
|
||||
tweets_complete <- tweets_full
|
||||
|
||||
for(a in 94:nrow(acc_df)) {
|
||||
for(a in 346:nrow(acc_df)) {
|
||||
user <- as.character(acc_df$screenname[a])
|
||||
name <- as.character(acc_df$name[a])
|
||||
max_id <- "999999999999999999"
|
||||
@@ -84,7 +84,7 @@ for(a in 94:nrow(acc_df)) {
|
||||
# Check if error code exists
|
||||
code <- errorCheckCode(tweets_temp) # 0 if no error
|
||||
if(code == 34) { # page does not exist
|
||||
status <- errorCode34
|
||||
status <- errorCode34()
|
||||
if(status == 1) { Sys.sleep(3);error <- error + 1;next}
|
||||
if(status == 2) {break}
|
||||
}
|
||||
@@ -164,7 +164,7 @@ for(a in 94:nrow(acc_df)) {
|
||||
write.csv(tweets_complete, "tweets_complete.csv")
|
||||
|
||||
|
||||
# Every tweet from 2014 from user[r] is downloaded. Now next user in for-loop
|
||||
# Every tweet from 2014 from user[a] is downloaded. Now next user in for-loop
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user