Problems accessing a website via RStudio


Problems connecting to a certain site via RStudio

 url <- ""
links <- read_html(url) %>% html_nodes('.DocumentSnippet') %>% html_nodes('a')

Generating the following error:

Error in open.connection(x, "rb") : 
  Failed to connect to port 443: Connection refused

I believe it is the proxy configuration in RStudio (or in R itself). I tried the solutions below, but there was always the same error:

  1. Configuring R to Use an HTTP or HTTPS Proxy

  2. The code set_config(use_proxy(url = "meuproxy", port = "meuproxy", user="user" e password = "password")) . With the proxy and my network login and password.

I know the code works as I tested it on my home computer and got the expected links.


Access this site before: there are definitions of what you can or cannot access.


This answer can help you:

Scroll to Top