Scraping web data

New to the rvest package and trying to scrape data from a website and having issues. (Might help to look at website for reference, Cameron Johnson College Stats | College Basketball at Sports-Reference.com) When I try to pull a name from the top like Cameron Johnson or a number value like 11.2 under PTS I have no problem, but when I try to pull something from one of the specific tables using the selector gadget it is not bringing any values back. I am not getting an error. It just brings no value. Any suggestions would be greatly appreciated because I am stumped!

cj=read_html("https://www.sports-reference.com/cbb/players/cameron-johnson-4.html")
offrtghtml <- html_nodes(cj, '#players_per_min tfoot tr:nth-child(1) .right:nth-child(25)')
offrtg <- html_text(offrtghtml)

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.