Skip to content

Commit

Permalink
sitemap generator: only include URLs from the same domain as the init…
Browse files Browse the repository at this point in the history
…ial URL
  • Loading branch information
janreges committed Dec 14, 2023
1 parent 0c67fd4 commit 9969254
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Crawler/Export/SitemapExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function export(): void
{
$urls = [];
foreach ($this->status->getVisitedUrls() as $visitedUrl) {
if ($visitedUrl->contentType === Crawler::CONTENT_TYPE_ID_HTML && $visitedUrl->statusCode === 200) {
if (!$visitedUrl->isExternal && $visitedUrl->contentType === Crawler::CONTENT_TYPE_ID_HTML && $visitedUrl->statusCode === 200) {
$urls[] = $visitedUrl->url;
}
}
Expand Down

0 comments on commit 9969254

Please sign in to comment.