Hi community
Im want run somes codes of web scraping in RCloud. But show this error.
library(rvest)
library(xml2)
library(tidyverse)
url <- "https://www.tripadvisor.co/"
cali <- read_html(url)
# Error in open.connection(x, "rb") : HTTP error 403.
I'm run in Rcloud because in my office pc don't have R in desktop.
A Proffesor of web Scraping from Ecuador help me by WhatasApp messages.
solution: add GET
fuction from library(httr)
library(rvest)
library(xml2)
library(tidyverse)
library(httr)
url<-"https://www.tripadvisor.co/Tourism-g297475-Cali_Valle_del_Cauca_Department-Vacations.html"
url <- GET(url, add_headers('user-agent' = 'Gov employment data scraper ([[your email]])'))
text_html <- url %>% read_html()
text_html
system
Closed
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.