I am working on a data visualization project and I need to scrape some data from a website.
When I tried I received the following error:
'Error in read_html.response(link): Forbidden (HTTP 403).'
From this, I understood that the website probably does not allow scraping. So I tried using a user agent with the following code:
user.agent<-"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
link<-GET("https://www.whosampled.com/Daft-Punk/Harder,-Better,-Faster,-Stronger/sampled/", user_agent(user.agent))
page<-read_html(link)
But still, the same error. Would anyone have any advice?
Heres a start: