Created
July 21, 2021 12:30
-
-
Save mcguinlu/235f7c450c914f7bc3a56f18e0a21c5b to your computer and use it in GitHub Desktop.
Everyman - Premier Tickets (will need Selenium)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t <- "https://www.everymancinema.com/bristol" | |
today <- "2021-07-21" | |
tmp <- read_html(t) %>% | |
html_nodes( | |
xpath = glue::glue( | |
'//div[@data-film-session="{today}"] //*[contains(concat( " ", @class, " " ), concat( " ", "filmTimeItem", " " ))]', | |
today = today | |
) | |
) %>% | |
rvest::html_attr("href") %>% | |
data.frame(temp = .) %>% | |
mutate(temp = last(unlist(stringr::str_split(temp, "/")))) | |
t2 <- | |
paste0("https://www.everymancinema.com/booking/Bristol/", | |
tmp$temp[1]) | |
tmp2 <- read_html(t2, ) %>% | |
html_nodes(".book-tickets") %>% | |
html_text() %>% | |
as.data.frame() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment