[英]html_table isn't recognising my node pass despite it being a table
rvest
軟件包的rvest
。.我試圖提取此處看到的表格,其中包括田徑比賽的結果。
https://www.decathlon2000.com/720/gotzis-2000/
基本的rvest
利用率似乎是將URL傳遞給read_html
,然后使用“ Selectorgadget” js小書簽選擇相關的CSS選擇器,然后將其插入到html_nodes
,這已經完成。
gotzis2000 <- read_html("https://www.decathlon2000.com/720/gotzis-2000/")
gotzis2000 %>% html_nodes("#articlecontent td")
但是,當我嘗試將其通過管道html_table
到html_table
:
gotzis2000 %>% html_nodes("#articlecontent td") %>% html_table()
我收到Error: html_name(x) == "table" is not TRUE
。
當我使用html_text
上述html_text
,我可以看到數據已提取,因此我不確定從這里提取正確的過程。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.