Help with Webscraping

Hi everyone,

I'm working on writing a web scraper for individual players in the NHL from www.nhl.com. Specifically, I'd like to get information from this report.

So far I have the following code:

url <- read_html('http://www.nhl.com/stats/player?report=bios&reportType=season&seasonFrom=19671968&seasonTo=20182019&gameType=2&filter=gamesPlayed,gte,1&sort=playerBirthDate')

dat2 <- html_nodes(url, '.rt-tr div') %>%
  html_table()

I have also tried html_text() rather than html_table() but both are returning empty lists. I'm not very familiar with web scraping so I'd love some pointers! Thanks everyone!:grin:

1 Like

One thing that has been suggested to me is that the table loads too slowly to be properly scraped but I'm not very good at rvest so I would love additional help on this.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.