0

我目前正在学习如何使用 R 创建刮板。我已经能够抓取一些相关的文本,但是当试图从 airbnb 列表中抓取房价时,我没有运气。有没有办法识别节点这样做?

我目前正在突出显示 airbnb 列表上的房价,并查看其来源。当使用列表的标题和位置这样做时,我成功了,但是当使用源尝试获取房价时,我没有运气。

<span class="_doc79r">$57</span>
##above is what I believe where it is located

##below is the code I'm using to try and get the room rate
airbnb_wvpg %>%
  html_node("._doc79r") %>%
  html_text()

我希望输出给我房价,在我的情况下是 57 美元,但实际输出是:[1] NA

4

0 回答 0