0
$url = 'http://ecigm.com/bk/dt/index.php?1=1&page=5';
  //采集规则
        $reg  = [
            'detail_link' => ['.deanarticec>.deanarticer>.deanarticername>a', 'href'],
            //采集文章标题
            'title'       => ['.deanarticec>.deanarticer>.deanarticername>a', 'text'],
            'image'       => ['.deanarticec>.deanarticel>.atc>a>img', 'src'],
            'brief'       => ['.deanarticec>.deanarticersummary', 'text', '-a -.content_copyright -script'],
        ];
        $rang = '.deanartice>ul>li';

        dd(QueryList::get($url)->encoding('UTF-8','GBK')->rules($reg)->range($rang)->queryData());    // not work
//        dd(QueryList::get($url)->rules($reg)->range($rang)->queryData());    //work
2019-07-18 提问
0 个回答

撰写答案

推广链接