website scraping cookies

Hi,
I'm trying to scrape a website that needs to you accept the use of cookies before showing any data.
i.e. www.marinetraffic.com

how can I best proceed?

previously I used:
VSL_Name <- WEBSITE_URL_TO_SPECIFIC_VESSEL %>% html_nodes(xpath=VSLName) %>% html_text()

but since the website was updated this approach does not work anymore

Thanks for your help
Patrick

It looks like they have an API for retrieving data:

Though it's not specific to R, this is a nice guide to how to approach web scraping in an ethical way, and you should always try to use an API when it's offered:

The polite package helps you do that with R and rvest:

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.