Skip to content

Commit

Permalink
add hrefLangList to default Crawler
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Sep 4, 2023
1 parent a8cd2a7 commit dd9f9bd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions packages/crawler/src/CrawlerConfig.php
Expand Up @@ -61,6 +61,7 @@ public function __construct(
'title',
'h1',
'canonical',
'hrefLang',
];
$this->dataDirectory = self::dataDirectory((string) $dataDirectory);
}
Expand Down
4 changes: 0 additions & 4 deletions packages/extractor/src/HrefLangExtractor.php
Expand Up @@ -19,10 +19,6 @@ public function getHrefLangList(): array
$toReturn = [];
$links = $this->crawler->filterXPath('//link[@hreflang]')->extract(['hreflang', 'href']);
foreach ($links as $link) {
if ('x-default' === $link[0]) {
continue;
}

if (isset($toReturn[$link[0]])) {
continue;
}
Expand Down

0 comments on commit dd9f9bd

Please sign in to comment.