draft/getScsbATM.R

getScsbATM <- function(){
  url      <- 'http://www.scsb.com.tw/content/about/about05_d.jsp'
  htmldoc1 <- content(GET(url, encoding='utf8'), as='text', encoding='utf8')
  htmldoc2 <- htmlParse(htmldoc1, encoding='utf8')
  tables   <- readHTMLTable(htmldoc2)
  info     <- rbind(tables[[3]],tables[[5]],tables[[7]],tables[[9]],tables[[11]])
  info1    <- data.frame('上海銀行ATM',info$V1[-which(info$V1=='縣市')],info$V2[-which(info$V1=='縣市')],info$V3[-which(info$V1=='縣市')],info$V4[-which(info$V1=='縣市')],info$V5[-which(info$V1=='縣市')],info$V6[-which(info$V1=='縣市')],info$V7[-which(info$V1=='縣市')],info$V8[-which(info$V1=='縣市')])
  
  names(info1) <- c('brand_nm','city','area','store_nm','addr','withdraw','print','saving','memo')
  info1
}
leoluyi/CRMaddress documentation built on May 21, 2019, 5:08 a.m.