我正在使用rvest抓取一个网站(here)。我正在尝试获取列出的所有582个人的URL。例如,其中一个人的网址是here。 一旦我在一个单独的URL中,我就能够成功地抓取我正在寻找的信息。下面是一个这样的例子: link = "https://www.supercluster.com/astronauts/jessica-u.-meir?sort=&ascending=false&life%20form=human&"
page = read_html(link)
# Time in space and spacewalk time
page %
目前,我希望使用R (主要是name、CAS Number和molecular weight )从化学数据库中获取一些数据。但是,我很难获得rvest来提取我正在寻找的信息。这是我到目前为止掌握的代码:
library(rvest)
library(magrittr)
# Read HTML code from website
# I am using this format because I ultimately hope to pull specific items from several different websites
webpage <- read_html(past
我正在做一个谷歌游戏应用的评论,但我无法获得的票数。我指出了代码:喜闻乐见<- html_obj %>% html_nodes(".xjKiLb") %>% html_attr(“aria-标签”),而我没有得到任何值。怎么做呢?
获得零票
全码
#Loading the rvest package
library(rvest)
library(magrittr) # for the '%>%' pipe symbols
library(RSelenium) # to get the loaded html of
url
我正在尝试修改rvest包中的示例代码,以获取instagram (例如,https://www.instagram.com/bradyellison/)上某个帐户的关注者数量。我尝试使用selectorgadget来隔离关注者数量的代码,得到的结果是:._218yx:nth-child(2) ._s53mj。但是我没有得到预期的追随者,也不确定如何调试它。这是我的代码。
# example
require(rvest)
html <- read_html("https://www.instagram.com/bradyellison/")
athlete_follow
我正试图从网站上提取2017年和2018年大学排名的数据。
我试图在R中运行一个代码,但是它给了我一个错误。
我的代码:-
library(rvest)
#Specifying the url for desired website to be scrapped
url <-"https://www.timeshighereducation.com/world-university-rankings/2018/world-ranking#!/page/0/length/-1/sort_by/scores_international_outlook/sort_order/asc/c
我的目标是从一个页面中提取所有链接并存储它,这样我就可以设计另一个爬虫来从它们中提取信息,并且有一个详尽的相关链接列表。然而,似乎我并没有将爬虫指向正确的方向来提取这些链接,因为我得到了一个空列表。
“”“
class ArticleSpider(scrapy.Spider):
name = 'links'
start_urls = [
'https://abcnews.go.com/search?searchtext=Coronavirus&type=Story&sort=date'
]
def pa