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:
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.
You tried to do something like this?
GET("http://had.co.nz", use_proxy("64.251.21.73", 8080), verbose())
– Daniel Falbel
With the site you passed works normal, but when trying something simple like:
t1 <- GET("http://had.co.nz/",
 use_proxy("10.10.120.59", 80, "flavio.matos", "password"), verbose())

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) : 
 Received HTTP code 407 from proxy after CONNECT
– Flavio Silva
@Flaviosilva this problem is associated with your proxy configuration yes. Please, what is your operating system and version?
– Flavio Barros