r - RSelenium always shows a redirection -
i trying repeat example code shown in rselenium remotedriver topic.  can see commented out responses getting redirection, , same response every rselenium function.  how overcome problem?  
startserver() remdr <- remotedriver$new() remdr$open() # [1] "connecting remote server" # [[1]] # [1] "<html>\r\n<head><title>redirection</title></head>\r\n<body><h1>redirect</h1></body>\r\n" #  # $id # [1] na  remdr$navigate("http://www.r-project.org") remdr$getpagesource() # [[1]] # [1] "<html>\r\n<head><title>redirection</title></head>\r\n<body><h1>redirect</h1></body>\r\n" # remdr$findelements(value = "//frame") # [[1]] # [1] "remotedriver fields" # $remoteserveraddr # [1] "localhost" #  # $port # [1] 4444 #  # $browsername # [1] "firefox" #  # $version # [1] "" #  # $platform # [1] "any" #  # $javascript # [1] true #  # $autoclose # [1] false #  # $nativeevents # [1] true #  # $extracapabilities # list() #  # [1] "webelement fields" # $elementid # [1] "<html>\r\n<head><title>redirection</title></head>\r\n<body><h1>redirect</h1></body>\r\n"   i working on corporate-supplied laptop behind proxy firewall. how change proxy access web when use httr or rvest packages: 
set_config(use_proxy(url = "http://proxy-server.mycompany.com:8080"))   any suggestions?
the proxy information needs passed list via extracapabilities. documentation on form proxy takes given here.
extracapabilities <- list(proxy = list(proxytype = "manual"                                        , httpproxy = "http://proxy-server.mycompany.com:8080")                           ) remdr <- remotedriver(extracapabilities = extracapabilities)      
Comments
Post a Comment