我在用selenuim来抓取网站,在使用过程中,我安装了selenium-server。我用了facebook的webdriver库,用来当client.以下是我的php代码
require_once 'vendor/autoload.php';
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
$host = 'http://localhost:4444/wd/hub';
$driver = RemoteWebDriver::create($host,DesiredCapabilities::chrome());
$driver->get('http://www.mm131.com/');
$driver->navigate()->to('http://www.mm131.com/');
以上代码运行过后,在我的ubuntu系统中打开了以下界面.
同时,我的控制台报了以下错误
我的环境是ubuntu16.04 php版本是7.1.3 chromedriver 是2.9版本 selenium版本为3.4.0,以上操作按照操作说明应该会跳转到指定链接上去,但是并没有!
我想问一下,这个拒绝链接是因为有了反爬虫的问题,还是说有其他什么问题么,另外我试了其他网站,得到的效果如下
hi 哥们在不在 mac下 java -jar selenium-server-standalone-xx.jar 指定jar报错 你遇到过没