开发者

PHPCrawl: exclude urls anding with ?query=

开发者 https://www.devze.com 2023-03-05 23:37 出处:网络
I\'m playing with PHPCrawl 开发者_StackOverflowand I\'d like to know if anybody knows if it possible to exclude from crawling all the URLS with parameters (either if they are .html or .php)like

I'm playing with PHPCrawl 开发者_StackOverflowand I'd like to know if anybody knows if it possible to exclude from crawling all the URLS with parameters (either if they are .html or .php)like

domain.com/article.html?showComment=1289420017718


Add a non-follow match pattern for any URL containing a question mark:

$crawler->addNonFollowMatch(".*\?.*")


I just foudn myself this works better

$crawler->addNonFollowMatch("/\?/");
0

精彩评论

暂无评论...
验证码 换一张
取 消