skip links collect with rel=nofollow attribute

This commit is contained in:
ghost 2023-09-06 00:34:59 +03:00
parent e576cb69db
commit a1e2721849

View File

@ -936,6 +936,15 @@ foreach ($db->getHostPageCrawlQueue(CRAWL_HOST_PAGE_QUEUE_LIMIT, time() - CRAWL_
continue;
}
// Skip links have rel=nofollow attribute
if ($rel = @$a->getAttribute('rel')) {
if (false !== stripos($rel, 'nofollow')) {
continue;
}
}
// Get title attribute if available
if (!$title = @$a->getAttribute('title')) {
$title = null;