OGPResolverでmeta[name="description"] にフォールバックする🐯 (#91)
This commit is contained in:
1 parent
735bb00eba
commit
116dd3b798
2 files changed
+16
-1
No files matched your search
@@ -30,7 +30,7 @@ class OGPResolver implements Resolver, Parser
|
||||
$metadata->title = $nodes->item(0)->textContent;
|
||||
}
|
||||
}
|
||||
$metadata->description = $this->findContent($xpath, '//meta[@*="og:description"]', '//meta[@*="twitter:description"]');
|
||||
$metadata->description = $this->findContent($xpath, '//meta[@*="og:description"]', '//meta[@*="twitter:description"]', '//meta[@name="description"]');
|
||||
$metadata->image = $this->findContent($xpath, '//meta[@*="og:image"]', '//meta[@*="twitter:image"]');
|
||||
|
||||
return $metadata;
|
||||
|
||||
Reference in new issue
Block a user