Browse Source

skip links collect with rel=nofollow attribute

main
ghost 1 year ago
parent
commit
a1e2721849
  1. 9
      src/crontab/crawler.php

9
src/crontab/crawler.php

@ -936,6 +936,15 @@ foreach ($db->getHostPageCrawlQueue(CRAWL_HOST_PAGE_QUEUE_LIMIT, time() - CRAWL_ @@ -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;

Loading…
Cancel
Save