我正在尝试使用 R(package rvest)抓取此页面的 HTML,但收到“客户端错误 416:请求的范围不可满足”
经过长时间的搜索,我似乎无法找到解决方案。它在尝试使用 rvest 的 html 函数时抛出错误,该函数解析 HTML 页面:
url <- "http://shop.tcgplayer.com/magic/onslaught/polluted-delta"
html(url)
我使用的是 R 版本 3.2.0。
如有任何帮助,我们将不胜感激!
最佳答案
你已经很接近了,只需使用现在更新的 read_html
从 url
中提取:
> read_html(url) %>%
+ html_nodes("table") %>%
+ html_text() %>%
+ .[[1]]
[1] "\r\n Rarity:\r\n R\r\n Card Type:\r\n Land \r\n Description:\r\n Tap, Pay 1 life, Sacrifice Polluted Delta: Search your library for an island or swamp card and put it into play. Then shuffle your library.\r\n\r\n \r\n "
关于html - 使用 rvest 抓取 html - 获取 http 错误 416,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31092425/