draft/getMatsusei.R

getMatsusei <- function(){
  URL="http://www.matsusei.com.tw/about/branch.asp?MenuId=3#a1"
  
  res <- GET(URL)
  res2 <- content(res, encoding='utf8')
  tables <- readHTMLTable(res2)
  table_1 <-tables[[1]][40:83,1:6]
  table_11=data.frame('松青超市', table_1) 
  
  table_2 <-tables[[1]][95:112,1:6]
  table_22=data.frame('松青超市', table_2) 
  
  table_3 <-tables[[1]][124:126,1:6]
  table_33=data.frame('松青超市', table_3) 
  
  tables_final <- rbind(table_11, table_22, table_33)
  
  rownames(tables_final) <- NULL
  
  colnames(tables_final) <- c("brand_nm", "store_type", "park", "store_nm", "addr", "tel_no", "time")
  tables_final
}
leoluyi/CRMaddress documentation built on May 21, 2019, 5:08 a.m.