我需要刮取 "稿件收到日期",該日期在右側框架中可見,一旦你在該頁面點擊 "資訊",就可以看到。https://onlinelibrary.wiley.com/doi/10.1002/jcc.26717 。我試著使用下面列出的一個rvest腳本,在類似的情況下運行良好。然而,它在這種情況下不起作用,也許是因為需要點擊才能進入出版歷史。我試圖通過在URL中加入#pane-pcw-details來解決這個問題(https://onlinelibrary.wiley.com/doi/10.1002/jcc.26717#pane-pcw-details),但沒有效果。另一個選擇是使用RSelenium,但也許有一個更簡單的解決方法?
library(rvest)
link <-c("https://onlinelibrary.wiley.com/doi/10.1002/jcc.26717#pane-pcw-details")
wiley_output <-data.frame()
page = read_html(link)
revhist = page %>% html_node(" 。 publication-history li:nth-child(5)") %>% html_text()
wiley_output = rbind(wiley_output, data. frame(link, revhist, stringsAsFactors = FALSE))
uj5u.com熱心網友回復:
這些資料來自一個ajax呼叫,你可以在網路標簽中找到。
https://onlinelibrary.wiley.com/action/ajaxShowPubInfo?ajax=true&doi=10.1002/jcc.26717
library(rvest)
library(magrittr)
鏈接 <- 'https://onlinelibrary.wiley.com/action/ajaxShowPubInfo?ajax=true&doi=10.1002/jcc.26717'/span>
page <- read_html(/span>link)
page %>% html_node(" 。 publication-history li:nth-child(5)") %>% html_text()
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/320253.html
標籤:
