getIkari <- function(){
URL='http://www.ikari.com.tw/store.php?search='
res <- GET(URL, encoding='utf8')
res2 <- content(res, encoding='utf8')
name <- xpathSApply(res2, '///*[@id="mainContent"]/dl/dd[1]/dl/dd/ul/li/h3/a', xmlValue)
addr <- xpathSApply(res2, '//*[@id="mainContent"]/dl/dd[1]/dl/dd/ul/li/em[2]', xmlValue)
tel <- xpathSApply(res2, '//*[@id="mainContent"]/dl/dd[1]/dl/dd/ul/li/em[1]', xmlValue)
name[1] <-"總店"
return(data.frame(brand_nm='怡客',store_nm=name,addr=addr,tel_no=tel, stringsAsFactors = FALSE))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.