Skip to content

Commit b1a7342

Browse files
committed
This looks successful.
1 parent b9e3ff7 commit b1a7342

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

microdata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def _extract(e, item, url=""):
181181
unlinked.extend(_extract(child, nested_item, url=url))
182182
item.set(itemprop, nested_item)
183183
elif itemprop:
184-
value = _property_value(child)
184+
value = _property_value(child, domain=url)
185185
# itemprops may also be in a space delimited list
186186
for i in itemprop.split(" "):
187187
item.set(i, value)
@@ -210,11 +210,11 @@ def _is_itemscope(e):
210210
return _attr(e, "itemscope") is not None
211211

212212

213-
def _property_value(e):
213+
def _property_value(e, domain=""):
214214
value = None
215215
attrib = property_values.get(e.tagName, None)
216216
if attrib in ["href", "src"]:
217-
value = URI(e.getAttribute(attrib))
217+
value = URI(e.getAttribute(attrib), domain)
218218
elif attrib:
219219
value = e.getAttribute(attrib)
220220
else:

0 commit comments

Comments
 (0)