mirror of
https://github.com/element-hq/synapse
synced 2024-09-16 04:25:10 +00:00
Handle og props with not content
This commit is contained in:
parent
78a16d395c
commit
a60169ea09
1 changed files with 2 additions and 1 deletions
|
@ -252,6 +252,7 @@ class PreviewUrlResource(Resource):
|
||||||
|
|
||||||
og = {}
|
og = {}
|
||||||
for tag in tree.xpath("//*/meta[starts-with(@property, 'og:')]"):
|
for tag in tree.xpath("//*/meta[starts-with(@property, 'og:')]"):
|
||||||
|
if 'content' in tag.attrib:
|
||||||
og[tag.attrib['property']] = tag.attrib['content']
|
og[tag.attrib['property']] = tag.attrib['content']
|
||||||
|
|
||||||
# TODO: grab article: meta tags too, e.g.:
|
# TODO: grab article: meta tags too, e.g.:
|
||||||
|
|
Loading…
Reference in a new issue