I am trying to scrape all details (Type Of Traveller, Seat Type,Route,Date Flown, Seat Comfort, Cabin Staff Service, Food & Beverages, Inflight Entertainment,Ground Service,Wifi & Connectivity,Value For Money) inclusive of the star rating
from the airline quality webpage
https://www.airlinequality.com/airline-reviews/emirates/
Not Working as expected
my_url<- c("https://www.airlinequality.com/airline-reviews/emirates/")
review <- function(url){
review<- read_html(url) %>%
html_nodes(".review-value") %>%
html_text%>%
as_tibble()
}
output <- map_dfr(my_url, review )
Only able to scrape star rating , I need to have the all details (e.g Cabin Staff Service - rating 2 , Food & Beverages = rating 5)
star <- function(url){
stars_sq <- read_html(url) %>%
html_nodes(".star") %>%
html_attr("class") %>%
as.factor() %>%
as_tibble()
}
output_star<- map_dfr(my_url, star )
The output of the result should be in a table form :
column : Type Of Traveller , Seat Type,Route,Date Flown, Seat Comfort .... with the star rating
row : each reviews