xpath to find non-meta tags with OG data

workspace
Brendan Howell 7 years ago
parent 10066d82d4
commit 8930c7df33

@ -182,7 +182,7 @@ class Publications(Bureau):
html = lxml.html.document_fromstring(resp.text)
#find all elements with property="og:<something>"
elements = html.findall(".//[@property]")
elements = html.findall(".//*[@property]")
for element in elements:
prop = element.get("property")
val = element.get("content")

Loading…
Cancel
Save