current status
This commit is contained in:
@@ -39,12 +39,18 @@ api_params <- c(
|
|||||||
"oauth_token_secret" = "rvfv8MgexFKTqrPNSoGrdrZVNhV4fTJb2Bgz249nbvKNg"
|
"oauth_token_secret" = "rvfv8MgexFKTqrPNSoGrdrZVNhV4fTJb2Bgz249nbvKNg"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
api_url2 <- "https://api.twitter.com/1.1/statuses/show.json"
|
||||||
|
id2="325330742961909760"
|
||||||
|
query2 <- c(id=id2, trim_user="true", include_entities="false")
|
||||||
|
current2 <- twitter_api_call(api_url2, query2, api_params)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
api_url <- "https://api.twitter.com/1.1/statuses/user_timeline.json";
|
api_url <- "https://api.twitter.com/1.1/statuses/user_timeline.json";
|
||||||
max_count <- "200"
|
max_count <- "200"
|
||||||
keep <- c("created_at", "id_str", "text", "retweet_count")
|
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_full <- data.frame(user=character(), name=character(), created_at=character(), id_str=character(), text=character(), retweet_count=character())
|
||||||
for(a in 157:nrow(acc_df)) {
|
for(a in 201:nrow(acc_df)) {
|
||||||
user <- as.character(acc_df$screenname[a])
|
user <- as.character(acc_df$screenname[a])
|
||||||
name <- as.character(acc_df$name[a])
|
name <- as.character(acc_df$name[a])
|
||||||
max_id <- "999999999999999999"
|
max_id <- "999999999999999999"
|
||||||
|
|||||||
+1
-4
@@ -2,13 +2,10 @@ require(stringr)
|
|||||||
|
|
||||||
# Replace characters messing up JSON validation (\,\n,^)
|
# Replace characters messing up JSON validation (\,\n,^)
|
||||||
correctJSON <- function(string) {
|
correctJSON <- function(string) {
|
||||||
# string <- str_replace_all(string, pattern = "\n", replacement = " ")
|
string <- gsub("\\\\{2,}", "", string)
|
||||||
# string <- str_replace_all(string, pattern = "\r", replacement = " ")
|
|
||||||
# string <- str_replace_all(string, pattern = "\\^", replacement = " ")
|
|
||||||
string <- str_replace_all(string, pattern = "[^[:print:]]", replacement = " ")
|
string <- str_replace_all(string, pattern = "[^[:print:]]", replacement = " ")
|
||||||
string <- str_replace_all(string, pattern = "&..;", replacement = " ")
|
string <- str_replace_all(string, pattern = "&..;", replacement = " ")
|
||||||
string <- str_replace_all(string, pattern = perl('\\\\(?![tn"])'), replacement = " ")
|
string <- str_replace_all(string, pattern = perl('\\\\(?![tn"])'), replacement = " ")
|
||||||
string <- str_replace_all(string, pattern = "\\{5}", replacement = " ")
|
|
||||||
return(string)
|
return(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+38709
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user