I have the following code to try and scrape a website:
url = "https://www.fotocasa.es/es/alquiler/casas/madrid-capital/todas-las-zonas/l"
x <- GET(url)
x %>%
read_html() %>%
html_nodes(xpath='//*[@id="App"]/div[2]/div[1]/main/div/div[4]')
What I would like to do is collect the page numbers at the bottom of the page, previously the following worked html_nodes(".sui-PaginationBasic-item a")
however, now it does not. I have tried to put the xpath
using inspect element.
The output would be something like:
c(1, 2, 3, 4, 5, ..., 101)
Depending on how many pages are on tis given page.