带有Tor的RSelenium与Windows上的新RSelenium版本 [英] RSelenium with Tor with NEW RSelenium version on Windows

查看:151
本文介绍了带有Tor的RSelenium与Windows上的新RSelenium版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在@jdharrison上找到了关于如何在Windows上使用 RSelenium 启动Tor的精彩答案:
https://stackoverflow.com/a/39048970/7837376

I found this fantastic answer by @jdharrison on how to launch Tor using RSelenium on windows: https://stackoverflow.com/a/39048970/7837376

RSelenium ,但 startServer()已失效,其替换 rsDriver()不要把java参数作为 startServer()之前做过。

In the new version of RSelenium, however, startServer() is defunct and its replacement rsDriver() does not take a java argument as startServer() did before.

如上所述启动Tor的方法是什么firefox在新的RSelenium语法中?非常感谢(提前)!

What is the way to launch Tor as above in firefox in the new RSelenium syntax? Thanks very much (in advance)!

推荐答案

您可以自己启动selenium服务器,而不是使用 rsDriver

You can start the selenium server yourself instead of using rsDriver

browserP <- "C:/Users/john/Desktop/Tor Browser/Browser/firefox.exe"
jArg <- paste0("-Dwebdriver.firefox.bin=\"", browserP, "\"")
pLoc <- "C:/Users/john/Desktop/Tor Browser/Browser/TorBrowser/Data/Browser/profile.meek-http-helper/"
jArg <- c(jArg, paste0("-Dwebdriver.firefox.profile=\"", pLoc, "\""))

wdman::selenium(jvmargs=jArg, selargs='any selenium args')
remDr <- remoteDriver(browserName ="firefox", port=4567L)
driver <- remDr$open()

这篇关于带有Tor的RSelenium与Windows上的新RSelenium版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆