当前位置 : 主页 > 网络编程 > PHP >

biquge.php

来源:互联网 收集:自由互联 发布时间:2021-06-28
biquge.php ['dd a','href','',function($content) use($baseUrl){// /0_478/4775388.html - http://www.biquge.tw/bookdata/1/478/4775388.txt $content=str_ireplace('.html', '.txt', $content); $split=explode('_', $content); $split[0]++; $content=im
biquge.php
  ['dd a','href','',function($content) use($baseUrl){
//      /0_478/4775388.html -> http://www.biquge.tw/bookdata/1/478/4775388.txt
        $content=str_ireplace('.html', '.txt', $content);
        $split=explode('_', $content);
        $split[0]++;
        $content=implode('/', $split);
        $content=$baseUrl.'bookdata'.$content;
        return $content;
    }],
    'name' => ['dd a','text'],
    ])->data;
$info= QueryList::Query($html,[
    'title' => ['h1','text'],
    'image' => ['#fmimg img','src','',function($content) use($baseUrl){
        return $baseUrl.substr($content, 1);
    }],
    'info'  => ['#intro','text'],
    'author'  => ['#info p:eq(0)','text','',function($content){
        return preg_replace('/([\w\W]*?):/i', '', $content);
    }],
    'category' => ['.con_top a:eq(1)','text'],
    'lastindextime'  => ['#info p:eq(2)','text','',function($content){
        return preg_replace('/([\w\W]*?):/i', '', $content);
    }],
    ])->data;
//打印结果
$data=$info[0];
$data['list']=$list;
echo json_encode($data);
上一篇:php自动pull脚本.txt
下一篇:img-table.php
网友评论