Problems accessing a website via Rstudio

Asked

Viewed 310 times

5

Problems when connecting there is a particular site via Rstudio

 url <- "https://www.jusbrasil.com.br/diarios/busca?q=%22licen%C3%A7a+sem+vencimentos%22&idtopico=T10001849&o=data"
links <- read_html(url) %>% html_nodes('.DocumentSnippet') %>% html_nodes('a')

Generating the following error:

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

I believe it is the proxy configuration in Rstudio (or 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 proxy and my network login and password.

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

  • 1

    You tried to do something like this? GET("http://had.co.nz", use_proxy("64.251.21.73", 8080), verbose())

  • With the site you passed works normal, but when trying something simple like: t1 <- GET("http://had.co.nz/",&#xA; use_proxy("10.10.120.59", 80, "flavio.matos", "password"), verbose())&#xA;&#xA;links <- read_html(t1) %>% html_text() The result is "Notificação: Autorização de proxy necessária(...). Already when I try the same code for the site I need I have the following problem: Error in curl::curl_fetch_memory(url, handle = handle) : &#xA; Received HTTP code 407 from proxy after CONNECT

  • 1

    @Flaviosilva this problem is associated with your proxy configuration yes. Please, what is your operating system and version?

1 answer

1


Browser other questions tagged

You are not signed in. Login or sign up in order to post.