rvest

    0熱度

    1回答

    我試圖用rvest程序包來抓取一組網頁。它在獲取網頁內容時起作用,但我無法獲得第一層的創建時間,該網頁爲2017-08-17 01:47。 url <- read_html("http://tieba.baidu.com/p/5275787419", encoding = "UTF-8") # This works contents <- url %>% html_nodes(".d_post

    0熱度

    1回答

    我知道如何在頁面分頁時循環,但我希望在一個循環函數中抓取多個信息/ html_nodes,但我不確定是否可以設置它。到目前爲止,我嘗試了以下。這基本上是一個jobsearch網站,我想要公司名稱,公司名稱和公開職位的數量。 我用sprintf來得到第1-14頁。 urlingtek <- sprintf("https://www.jobindex.dk/virksomhedsoversigt/ka

    1熱度

    1回答

    我正在嘗試爲Data Science 101項目刮冰球參考。我遇到了特定表格的問題。網頁是:https://www.hockey-reference.com/boxscores/201611090BUF.html。所需表格在「高級統計報告(所有情況)」下。我已經嘗試了以下代碼: url="https://www.hockey-reference.com/boxscores/201611090BUF

    0熱度

    1回答

    我一直在試圖使用selectorgadget在R的特定網站的webscrape數據。例如,我成功地從http://www.dotabuff.com/heroes/abaddon/matchups webscraped之前。通常,我只需使用selectorgadget Chrome擴展單擊我想要的表格,並將CSS選擇結果放入代碼中,如下所示。 urlx <- "http://www.dotabuff

    -1熱度

    2回答

    我試圖從多個頁面(233)的Securities Class Action Filings網站上刮取表格。我的代碼如下: install.packages("rvest") install.packages("magrittr") install.packages("xml2") library(xml2) library(rvest) library(magrittr) libra

    1熱度

    2回答

    我試圖將圖書存儲庫中的數據轉換成數字數據,以便我可以繪製圖表。 我的代碼目前是: selector <- ".rrp" library(rvest) url <- "https://www.bookdepository.com/bestsellers" doc <- read_html(url) prices <- html_nodes(doc, selector) html_text(

    3熱度

    1回答

    我試圖以編程方式搜索網站,但提交按鈕的功能似乎用JavaScript來實現主要動力。我不太熟悉它是如何工作的,所以我可能是錯的。 這裏是我使用的代碼: library(rvest) BASE_URL = 'https://mdocweb.state.mi.us/otis2/otis2.aspx' PARAMS = list(txtboxLName='Smith', drpdw

    -1熱度

    1回答

    我怎麼輸出,我從html_table得到存儲到一個變量?: library(rvest) elec<- read_html("https://en.wikipedia.org/wiki/Botswana_general_election,_1969") elec%>% html_nodes("table.wikitable")%>% htm

    2熱度

    2回答

    我想從這個頁面獲取座標,http://hol.osu.edu/spmInfo.html?id=CMNHENT0042647。 當我嘗試獲取文本時,我得到的是" "作爲回報。 library(rvest) ID<-"CMNHENT0042647" HOLWebSite<-read_html("http://hol.osu.edu/spmInfo.html?id=",ID) Coords<

    0熱度

    1回答

    我有這段代碼嘗試從Kitco網站獲取黃金的每日現貨價格。 library("rvest") library("dplyr") library("tidyr") library("tibble") maya <- read_html("http://www.kitco.com/market/") mara <- html_nodes(maya, "table") mata <- html