<?php $oA= $_POST['cent']; $url= "此处已被省略"; include "./vendor/autoload.php"; use \QL\QueryList; $rules=array( "img"=>array(".cell .cell_poster img",'src'), "title"=>array(".cell .cell_imform .cell_imform_name",'text'), "time"=>array(".blockcontent1 .cell .cell_imform .cell_imform_kvs div:eq(3) .cell_imform_value",'text'), "author"=>array(".blockcontent1 .cell .cell_imform .cell_imform_kvs div:eq(7) .cell_imform_value",'text'), "state"=>array(".blockcontent1 .cell .cell_imform .cell_imform_kvs div:eq(4) .cell_imform_value",'text'), "type"=>array(".blockcontent1 .cell .cell_imform .cell_imform_kvs div:eq(6) .cell_imform_value",'text'), "about"=>array(".blockcontent1 .cell .cell_imform .cell_imform_kvs div:eq(8) .cell_imform_desc",'text'), ); $data=QueryList::Query($url,$rules)->data; // echo "<pre>"; // print_r($data); echo json_encode($data); ?>
那应该是页面懒加载,没有将div的元素显示出来。你可能需要找到api数据接口去获取数据,或者需要模拟网页的浏览方式,用selenium,来进行页面加载,随后进行页面访问。
建议将网页的url提供出来,我们帮你找找数据接口api.
这个得看你的页面代码了,从这里看不出问题。
您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~
如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~
ps: 问答会员年卡【8折】购 ,限时加赠IT实体书,即可 享受50次 有问必答服务,了解详情>>>https://t.csdnimg.cn/RW5m