Skip to content

Commit

Permalink
修复get_fields函数
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzetao authored and yangzetao committed Aug 7, 2017
1 parent fbe0178 commit 5d4655d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/phpspider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,10 @@ public function get_fields($confs, $html, $url, $page)
// field不为空而且存在子配置
if (!empty($values) && !empty($conf['children']))
{
if (!$values)
{
$values = array($values);
}
$child_values = array();
// 父项抽取到的html作为子项的提取内容
foreach ($values as $child_html)
Expand Down

0 comments on commit 5d4655d

Please sign in to comment.