I am trying to scrape the first 4 pages from the following site for educational purposes using R code:
{r}
library(rvest)
library(purrr)
library(tidyverse)
url_base <- "https://www.boliga.dk/salg/resultater?searchTab=1&page=%d&sort=date-d&zipcodeFrom=1000&zipcodeTo=2499&street="
map_df(1:4,function(i){
page <- read_html(sprintf(url_base,i))
data.frame(Address = html_text(html_nodes(page,".font-weight-bolder.text-left")))
}) -> Address_map
View(Address_map)
The only issue with this code is that it does not actually show me the first 4 pages, but instead it provides me with the first page four times.
I hope you can help in fixing this small issue.