0
0
Fork 0

Fix details extraction when no title exists. (#30933)

This commit is contained in:
David Roetzel 2024-07-05 15:28:52 +02:00 committed by GitHub
parent 016c1e4e78
commit 97eddb5906
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 27 additions and 1 deletions

View file

@ -156,7 +156,7 @@ class LinkDetailsExtractor
end
def title
html_entities_decode(structured_data&.headline || opengraph_tag('og:title') || document.xpath('//title').map(&:content).first).strip
html_entities_decode(structured_data&.headline || opengraph_tag('og:title') || document.xpath('//title').map(&:content).first)&.strip
end
def description