Skip to content

Instantly share code, notes, and snippets.

@mcguinlu
Created July 21, 2021 12:30
Show Gist options
  • Save mcguinlu/235f7c450c914f7bc3a56f18e0a21c5b to your computer and use it in GitHub Desktop.
Save mcguinlu/235f7c450c914f7bc3a56f18e0a21c5b to your computer and use it in GitHub Desktop.
Everyman - Premier Tickets (will need Selenium)
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