public function handle()
{
$url = 'http://www.biochemsafebuy.com/m/category_detailed/0';
$this->spiderList($url);
}
private function spiderList($url){
Log::info('list_url', [$url]);
$html = file_get_contents($url);
$dom = new \DOMDocument();
@$dom->loadHTML($html);
$dom->normalize();
$xpath = new \DOMXPath($dom);
//$lists = $xpath->query('.//div[contains(@class, "wrap-img")]/a/text()');
$lists = $xpath->query('.//div[contains(@class, "wrap-img")]/a/@href');
foreach ($lists as $node) {
$detail_url = $node->nodeValue;
Log::info('detail_url', [$detail_url]);
}
}