draft/getLeeZen.R

getLeeZen <- function(){
  URL <- 'http://www.leezen.com.tw/big5/main2.asp'
  res <- GET(URL, encoding='utf8')
  res2 <- htmlParse(content(res, "text", encoding = "utf8"), encoding = "utf8")
  
  store <- cssApply(res2,'b>a>font',cssCharacter)
  store <- str_replace_all(store, '[:space:]', '')
  store <- matrix(data=store,ncol = 3,byrow = TRUE)
  addr <- cssApply(res2,'td.style1>div>a>font',cssCharacter)
  
  leezen = data.frame(brand_nm='้‡Œไป',store_nm=store[,1],addr=addr,tel_no=store[,2],note=store[,3], stringsAsFactors = FALSE)
}
leoluyi/CRMaddress documentation built on May 21, 2019, 5:08 a.m.