Skip to content

Commit

Permalink
解决相对路径url得到http:///jjj.html这样的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
suppernice committed Jul 16, 2018
1 parent e055d6d commit dec4ac2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion core/phpspider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,6 @@ public function fill_url($url, $collect_url)
}
}

echo $url;exit;
return $url;
}

Expand Down
9 changes: 0 additions & 9 deletions demo/qiushibaike.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,6 @@

$spider = new phpspider($configs);

$spider->on_before_download_page = function($url, $link)
{
// 比如有时需要根据某个特定的URL,来决定这次的请求是否使用代理 / 或使用哪个代理
//$link['proxy'] = '223.153.69.150:42354';
//return $link;
};

$spider->on_handle_img = function($fieldname, $img)
{
$regex = '/src="(https?:\/\/.*?)"/i';
Expand Down Expand Up @@ -137,7 +130,6 @@

$spider->on_extract_field = function($fieldname, $data, $page)
{
var_dump($fieldname);
if ($fieldname == 'article_title')
{
if (strlen($data) > 10)
Expand All @@ -158,7 +150,6 @@
{
$data = $page['url'];
}
exit;
return $data;
};

Expand Down

0 comments on commit dec4ac2

Please # to comment.