0
我很喜歡R的圖書館刮刮網站,但我正在努力尋找新的東西。從這個網頁 - http://www.naia.org/ViewArticle.dbml?ATCLID=205323044 - 我試圖刮高校主表。使用R rvest圖書館在iframe中刮臉
這裏是我的代碼看起來像現在:
NAIA_url = "http://www.naia.org/ViewArticle.dbml?ATCLID=205323044"
NAIA_page = read_html(NAIA_url)
tables = html_table(html_nodes(NAIA_page, 'table'))
# tables returns a length-2 list, however neither of these tables are the table I desire.
# grab the correct iframe node
iframe = html_nodes(NAIA_page, "iframe")[3]
但是我掙扎過去這一點。 (1)由於某種原因,調用html_nodes不是抓住我想要的表。 (2),我不確定是否應該抓取iframe,然後嘗試從中抓取表格。
任何幫助表示讚賞!
你應該得到的'iframe'的源,並從那裏搶表 – yeedle