我使用 phantomjs webdriver 来实现 RPA。它尝试使用以下代码加载一个网址:webDriver.get(url);问题是我可以手动访问这个 url(只需将它复制到浏览器中的地址行中)。它加载良好。但是说到phantomjs就加载不了了。我觉得可能跟ssl协议有关,所以给phantomjs设置了这些选项:--ignore-ssl-errors=true--ssl-protocol=any--web-security=true还是一样的。在调试模式下,我在尝试加载 url 时收到以下日志:[DEBUG] HTTP Request - URI /session/1ed10cc0-ddc6-11e8-87f5-2f782befb71d/url[DEBUG] HTTP Request - Method POST[DEBUG] HTTP Request - HTTP Version 1.1[DEBUG] HTTP Request - Query String [DEBUG] HTTP Request - Receiving Header "Accept" = "application/json, image/png"[DEBUG] HTTP Request - Receiving Header "Content-Type" = "application/json; charset=utf-8"[DEBUG] HTTP Request - Receiving Header "Content-Length" = "141"[DEBUG] HTTP Request - Receiving Header "Host" = "localhost:64560"[DEBUG] HTTP Request - Receiving Header "Connection" = "Keep-Alive"[DEBUG] HTTP Request - Method POST/PUT[DEBUG] HTTP Request - Content Body: {"url":"myHiddenUrl"}[DEBUG] WebPage - updateLoadingProgress: 56[DEBUG] WebPage - updateLoadingProgress: 58[DEBUG] WebPage - updateLoadingProgress: 61[DEBUG] WebPage - updateLoadingProgress: 63[DEBUG] WebPage - updateLoadingProgress: 66[DEBUG] WebPage - updateLoadingProgress: 69[DEBUG] WebPage - updateLoadingProgress: 72[DEBUG] WebPage - updateLoadingProgress: 74[DEBUG] WebPage - updateLoadingProgress: 77[DEBUG] WebPage - updateLoadingProgress: 80所以如你所见,有 500 个错误。但我不知道它可能有什么关系。我手动没有这样的问题。它可以是带有请求标头的东西吗?在此先感谢您对这个问题的任何帮助。
添加回答
举报
0/150
提交
取消