1

I need to read a source code for a reasearch and I can read the full text when I use a browser, but in R there is a hidden part. The code is replaced by a message saying that the content is allowed just for browsers which use cookies.

Based on the question How to properly set cookies to get URL content using httr I am using the following code:

library(httr)
url<-"https://www.ogol.com.br/player_results.php?id=5637"

r <- GET(url, query = list(a = 1))
cookies(r)

response<-GET(url, 
    set_cookies(`__cfduid` = "dde27d084f28a84488910bf48f22f5fa01530024956",
                `FORCE_SITE_VERSION` = "desktop",
                `FORCE_MODALIDADE` = "1",
                `PHPSESSID` = "uou4jukkosdaafidp26857k8t3"))


player_code<-content(x = response,as = "text", encoding = "ISO-8859-1")   

But it also hides a part of the code and returns the message:

"Este conteúdo apenas está disponível para browsers que aceitam cookies" (put the message just to identify if your help has the same result :) )

It means: The content is available just for browsers that accept cookies.

Am I using wrong cookie values or any other clue? Thanks in advance.

0 Answers0