mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-09-04 10:11:57 +00:00
add link tag support
This commit is contained in:
parent
a5a48f37f7
commit
b433fa6b3c
@ -954,6 +954,25 @@ foreach ($db->getHostPageCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECOND
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (@$dom->getElementsByTagName('link') as $link) {
|
||||||
|
|
||||||
|
// Skip nodes without href attribute
|
||||||
|
if (!$href = @$link->getAttribute('href')) {
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add link to queue
|
||||||
|
$links[] = [
|
||||||
|
'title' => null,
|
||||||
|
'description' => null,
|
||||||
|
'keywords' => null,
|
||||||
|
'data' => null,
|
||||||
|
'mime' => null,
|
||||||
|
'ref' => $href,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// Collect internal links from page content
|
// Collect internal links from page content
|
||||||
foreach(@$dom->getElementsByTagName('a') as $a) {
|
foreach(@$dom->getElementsByTagName('a') as $a) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user