|
@@ -13,7 +13,7 @@ use QL\QueryList;
|
|
|
|
|
|
|
|
class Baidu implements PluginContract
|
|
class Baidu implements PluginContract
|
|
|
{
|
|
{
|
|
|
- private $is_pc;
|
|
|
|
|
|
|
+ private $is_pc = true;
|
|
|
protected $ql;
|
|
protected $ql;
|
|
|
protected $keyword;
|
|
protected $keyword;
|
|
|
protected $pageNumber = 10;
|
|
protected $pageNumber = 10;
|
|
@@ -38,6 +38,7 @@ class Baidu implements PluginContract
|
|
|
],
|
|
],
|
|
|
'M' => [
|
|
'M' => [
|
|
|
'title' => ['h3', 'text'],
|
|
'title' => ['h3', 'text'],
|
|
|
|
|
+ 'tpl' => ['', 'tpl'],
|
|
|
'link' => ['', 'data-log']
|
|
'link' => ['', 'data-log']
|
|
|
],
|
|
],
|
|
|
];
|
|
];
|
|
@@ -85,7 +86,12 @@ class Baidu implements PluginContract
|
|
|
{
|
|
{
|
|
|
return $this->query($page)->query()->getData(function ($item) use ($realURL) {
|
|
return $this->query($page)->query()->getData(function ($item) use ($realURL) {
|
|
|
if (!$this->is_pc) {
|
|
if (!$this->is_pc) {
|
|
|
- $item['link'] = json_decode($item['link'], true)['mu'];
|
|
|
|
|
|
|
+ if ($item['tpl']!='www_normal'){
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+ $origin=json_decode($item['link'], true);
|
|
|
|
|
+ unset($item['tpl']);
|
|
|
|
|
+ $item['link'] = $origin['mu'];
|
|
|
} else {
|
|
} else {
|
|
|
$realURL && $item['link'] = $this->getRealURL($item['link']);
|
|
$realURL && $item['link'] = $this->getRealURL($item['link']);
|
|
|
}
|
|
}
|