QueryList-PhantomJS icon indicating copy to clipboard operation
QueryList-PhantomJS copied to clipboard

获取不到html

Open boorcode opened this issue 7 years ago • 1 comments

$html = $ql->browser('https://m.toutiao.com')->getHtml(); 返回"" 请问大神们什么原因呢?

boorcode avatar Jan 24 '18 04:01 boorcode

我也获取的空body(TP5.1+PHP7.2.9)

配合QueryList使用有个bug:PHP Warning: Declaration of JonnyW\PhantomJs\DependencyInjection\ServiceContainer::load() ...,需要修改源代码函数为 load($file = null) PHP7.3以上报错一个函数不再支持,所以切到7.2.9

win10下 二进制文件路径只能这样设置,其他报错,跟演示不一样

$ql = QueryList::use(PhantomJs::class,'D:/Program Files/phantomjs-2.1.1/bin/phantomjs.exe'); $html = $ql->browser('https://www.baidu.com')->getHtml(); print_r($html);

获取结果为没有BODY的

k6xiao avatar Jul 21 '22 09:07 k6xiao