getYogi <- function(){
res <- GET("http://www.yogi-house.com/store.php?lo=all")
res <- htmlParse(res, encoding = 'utf8')
store_nm=xpathSApply(res, '//*[@class="store-list"]/a[@class="store-name"]', xmlValue)
tel_no=xpathSApply(res, '//*[@class="store-list"]/p[1]', xmlValue)
addr=xpathSApply(res, '//*[@class="store-list"]/p[2]', xmlValue)
FINISH= data.frame(brand_nm='無毒的家',store_nm=store_nm,addr=addr,tel_no=tel_no,data_dt=gsub('-','',Sys.Date()) ,stringsAsFactors=FALSE )
return(FINISH)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.