我是R的新手,我正在尝试通过网页抓取jsp页面来收集数据。我想要的页面是:https://www.taxpayerservicecenter.com/RP_Search.jsp我得到一个浏览器打开这个网址后,我想选择邻域,并在那里搜索所有数据。
此外,是否有更简单/更好的方法来执行此操作?此页面包含按钮和表单,因此它不像说,从维基百科页面刮取。
library(RSelenium) #passes
checkForServer() #passes
startServer() #passes
remDriver <- remoteDriver(remoteServerAddr="localhost", port=4444, browserName="firefox")
以下行是我收到错误的地方:
remDriver$open() #opens a browser, get the farthest w firefox
这是我收到的错误消息。我到处搜索如何解决这个问题!:
> remDriver$open() #opens a browser, get the farthest w firefox
[1] "Connecting to remote server"
Error: Summary: UnknownError
Detail: An unknown server-side error occurred while processing the command.
class: org.openqa.selenium.firefox.NotConnectedException
我尝试过的事情:
这是我的会话信息:
> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RSelenium_1.3.5 XML_3.98-1.4 RJSONIO_1.3-0 RCurl_1.95-4.8 bitops_1.0-6
loaded via a namespace (and not attached):
[1] tools_3.3.0 caTools_1.17.1
请,请帮忙!