为什么PhantomJS与Chrome有不同的结果?

时间:2017-02-27 07:51:46

标签: python selenium phantomjs selenium-chromedriver

我使用相同的代码用PhantomJS或Chrome抓取网站,前者可以用于任何页面,但稍后会显示如下错误,有什么可以解决这个问题?

Exception in thread Thread-18:
Traceback (most recent call last):
    self.run()
    self._target(*self._args, **self._kwargs)
    browser.get(urlServer)
    self.execute(Command.GET, {'url': url})
    response = self.command_executor.execute(driver_command, params)
    return self._request(command_info[0], url, body=data)
    self._conn.request(method, parsed_url.path, body, headers)
    self._send_request(method, url, body, headers, encode_chunked)
    self.putrequest(method, url, **skips)
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent

0 个答案:

没有答案