Skip to content

Commit 09023ec

Browse files
author
Xavier Grangier
committed
grangier#217 - check if content value is not None
1 parent a059fa1 commit 09023ec

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

goose/extractors/opengraph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ def extract(self):
3434
attr = self.parser.getAttribute(meta, 'property')
3535
if attr is not None and attr.startswith("og:"):
3636
value = self.parser.getAttribute(meta, 'content')
37-
opengraph_dict.update({attr.split(":")[1]: value})
37+
if value:
38+
opengraph_dict.update({attr.split(":")[1]: value})
3839
return opengraph_dict

0 commit comments

Comments
 (0)