我正试图从安全网页中提取一些评论,如下所示:
# Attempt to extract information from a online secure page
library(rvest)
URL <- "https://www.bankbazaar.com/insurance/religare-health-insurance.html"
mainPage <- read_html(URL)
reviewsHTML <- html_nodes(mainPage, ".ellipsis_text")
reviewsHTML
以上代码为我输出 {xml_nodeset(0)} 。但是当我在我的本地系统中首先将该网页(使用ctrl + S)保存为“Religare Health Insurance.html”然后尝试提取评论时,我能够提取评论。
# Attempt to extract information from a offline secure page
library(rvest)
URL <- "Religare Health Insurance.html"
mainPage <- read_html(URL)
reviewsHTML <- html_nodes(mainPage, ".ellipsis_text")
reviewsHTML
{xml_nodeset (20)}
[1] <span itemprop="description" class="ellipsis_text">I have taken my health insurance from Religare......
问题: