Fail-safe Wikipedia reciprocal check
Committed b5f0fb
--- a/indieweb_rocks/__init__.py
+++ b/indieweb_rocks/__init__.py
"wikipedia",
"org",
):
- recip_url = agent.get(me_url).mf2json["items"][0]["properties"]["url"][0]
- if recip_url == url:
- reciprocals.add(me_url.minimized)
+ wp_props = agent.get(me_url).mf2json["items"][0]["properties"]
+ if wp_url := wp_props.get("url"):
+ if wp_url[0] == url:
+ reciprocals.add(me_url.minimized)
if me_url.host not in rel_me_silos:
continue
try: