I would like to scrape product name and the rating from a webpage. Upon inspecting the element, I know I need to get the data from product__title and attraqt-star-rating-stars__bar. But I am not sure how to do it as this is embedded within the multiple layers of tag. I've tried the following with no avail; any suggestions are welcome.
library(rvest)
library(dplyr)
url = 'https://www.chemistwarehouse.com.au/shop-online/159/oral-hygiene-and-dental-care'
stores <- read_html(url)
stores %>% html_nodes('body') %>%
html_nodes('.product__title') %>%
rvest::html_text()
stores %>% html_nodes('body') %>%
html_nodes('attraqt-star-rating-stars__bar') %>%
rvest::html_text()