我正在玩PHPCrawl,我想知道是否有人知道是否可以排除所有带有参数的URL的抓取(如果它们是.html或.php)这样的
domain.com/article.html?showComment=1289420017718
为任何包含问号的网址添加非跟随匹配模式:
$crawler->addNonFollowMatch(".*'?.*")
我只是发现自己这更好用
$crawler->addNonFollowMatch("/'?/");
我正在玩PHPCrawl,我想知道是否有人知道是否可以排除所有带有参数的URL的抓取(如果它们是.html或.php)这样的
domain.com/article.html?showComment=1289420017718
为任何包含问号的网址添加非跟随匹配模式:
$crawler->addNonFollowMatch(".*'?.*")
我只是发现自己这更好用
$crawler->addNonFollowMatch("/'?/");