0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-07-06 03:08:58 +02:00

Handle og props with not content

This commit is contained in:
Erik Johnston 2016-06-15 16:57:48 +01:00
parent 78a16d395c
commit a60169ea09

View file

@ -252,7 +252,8 @@ class PreviewUrlResource(Resource):
og = {}
for tag in tree.xpath("//*/meta[starts-with(@property, 'og:')]"):
og[tag.attrib['property']] = tag.attrib['content']
if 'content' in tag.attrib:
og[tag.attrib['property']] = tag.attrib['content']
# TODO: grab article: meta tags too, e.g.: