Scraping html with rvest - getting http error 416

575 views Asked by At

I am trying to scrape the HTML of this page using R (package rvest), but am getting "client error 416: Requested Range Not Satisfiable"

After a long search, I can't seem to find a solution. It throws the error when trying to use rvest's html function, which parses an HTML page:

url <- "http://shop.tcgplayer.com/magic/onslaught/polluted-delta"
html(url)

I am using R version 3.2.0.

Any help would be appreciated!

1

There are 1 answers

0
Stedy On

You are pretty close, just keep extracting from url with the now updated read_html:

> 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                        "