skip javascript/mailto links index

This commit is contained in:
ghost 2023-04-07 05:19:32 +03:00
parent 2a843449e0
commit 9b9d40a97c

View File

@ -100,6 +100,20 @@ foreach ($db->getCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECONDS_OFFSET
continue; continue;
} }
// Skip javascript links
if (false !== strpos($href, 'javascript:')) {
continue;
}
// Skip mailto links
if (false !== strpos($href, 'mailto:')) {
continue;
}
// @TODO skip other apps
// Add absolute URL prefixes to the relative links found // Add absolute URL prefixes to the relative links found
if (!parse_url($href, PHP_URL_HOST)) { if (!parse_url($href, PHP_URL_HOST)) {