I have been scraping a table from this website succsessfully since the user hrbrmstr gave his answer to this question of mine 5 years ago. Lately something about the website changed and I can't fetch the data any longer.
URL <- "http://www.fiskistofa.is/veidar/aflaupplysingar/landanir-eftir-hofnum/"
library(httr)
library(rvest)
res <- POST(url = URL,
query = list(lang="is"),
body = list(magn = "Sundurlidun",
hofn = "87",
dagurFra = format(lubridate::today()-4, "%d.%m.%Y"),
dagurTil = format(lubridate::today(), "%d.%m.%Y"),
hnappur = "Sækja"),
encode = "form")
doc <- content(res, as="parsed")
This is how I used to be able to find and extract the table but now the output is empty:
html_nodes(doc, xpath=".//table[contains(., 'Magn')]") %>%
html_table(header=TRUE)
Nothing in the appearance of the site has changed but recently they opened up this Power BI (the table is on page nr. 3) for this database so they may have changed something in the meantime that I don't know about.
Any suggestions?