The HCard.from_soup() method tries to loop through all of the items that mf2py has found in the page source:
for item in parsed_data.get("items", []):
try:
return _parse_hcard(item, save)
except NotEnoughData as e:
log.debug(e)
continue
But this currently results in it giving up after the first item, if that wasn't an h-card that generated a NotEnoughData exception.
e.g. if there are two items found, an h-entry and then an h-card, _parse_hcard() will return None when it looks at the h-entry, and so from_soup() will immediately do the same, before it can send the h-card to _parse_hcard().
The
HCard.from_soup()
method tries to loop through all of theitems
that mf2py has found in the page source:But this currently results in it giving up after the first item, if that wasn't an
h-card
that generated aNotEnoughData
exception.e.g. if there are two items found, an
h-entry
and then anh-card
,_parse_hcard()
will returnNone
when it looks at theh-entry
, and sofrom_soup()
will immediately do the same, before it can send theh-card
to_parse_hcard()
.