vendredi 27 mars 2015

Messy code return by using rvest in R

I want to grab web text from taobao.com: shop <- html('http://ift.tt/1yhhQxv',encoding="utf-8")



shop %>%
html_node(".tb-main-title") %>%
html_text() %>%
as.character()


But it doesn't work,the result is: "\n HM7000 钃濈墮鑰虫満 涓枃鎶\xa5 绔嬩綋澹\xb0 涓€鎷栦簩 鍚煶涔\x90\n " ps: i try add encoding='utf-8' in html function.





Aucun commentaire:

Enregistrer un commentaire