Nothing
#'Scrape monthly Mixer statistics from socialblade.com
#'
#'@param url will only work with https://socialblade.com/mixer/user/.../monthly links
#'
#'@keywords mixer
#'@concept socialblade
#'@export
#'@examples
#'sbscrape_mixer("https://socialblade.com/mixer/user/thegrefg/monthly")
sbscrape_mixer<-function(url){
# require(rvest,quietly = TRUE)
# require(lubridate,quietly=TRUE)
tryCatch(
{
pipeit<-function(url,code){
read_html(url)%>%html_nodes(code)%>%html_text()
}
fl<-pipeit(url,
"#socialblade-user-content div div div:nth-child(2) div:nth-child(2)")
fl<-fl[grepl("[0-9]",fl)]
fl<-gsub("[A-z]","",fl)
fl<-trimws(fl)
cv<-pipeit(url,
"#socialblade-user-content div div div:nth-child(3) div:nth-child(2)")
dates<-c()
for(i in 1:30){
dates[i]<-Sys.Date()-i+1
}
dates<-rev(as_date(dates))
fl<-as.numeric(sapply(as.character(fl),
function(x) gsub(",","",x)))
cv<-as.numeric(sapply(as.character(cv),
function(x) gsub(",","",x)))
ern<-pipeit(url,"#socialblade-user-content div div div:nth-child(4) div:nth-child(2)")
ern<-as.numeric(ern)
data.frame(Date=dates,"Culmulative Followers"=fl,"Culmulative Views"=cv,"Level"=ern)
},
error=function(error_message){
message("Error in sbscrape: Please enter valid url. ")
message("sbscrape will only work with https://socialblade.com/mixer/user/.../monthly links")
})
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.