software = "misskey"
else:
# NOISY-DEBUG: print("DEBUG: Using name:", domain, json["software"]["name"])
- software = json["software"]["name"].lower()
+ software = tidyup(json["software"]["name"].lower())
+ if software == "":
+ software = None
except:
print("WARNING: Could not determine software type:", domain)
if counter == 0:
# NOISY-DEBUG: print("DEBUG: Sending JSON API request to domain,step,counter:", domain, step, counter)
doc = post_json_api(domain, "/api/federation/instances/", json.dumps({
- "sort": "+caughtAt",
- "host": None,
+ "sort" : "+caughtAt",
+ "host" : None,
"suspended": True,
- "limit": step
+ "limit" : step
}))
else:
# NOISY-DEBUG: print("DEBUG: Sending JSON API request to domain,step,counter:", domain, step, counter)
doc = post_json_api(domain, "/api/federation/instances/", json.dumps({
- "sort": "+caughtAt",
- "host": None,
+ "sort" : "+caughtAt",
+ "host" : None,
"suspended": True,
- "limit": step,
- "offset": counter-1
+ "limit" : step,
+ "offset" : counter-1
}))
# NOISY-DEBUG: print("DEBUG: doc():", len(doc))
if counter == 0:
# NOISY-DEBUG: print("DEBUG: Sending JSON API request to domain,step,counter:", domain, step, counter)
doc = post_json_api(domain,"/api/federation/instances", json.dumps({
- "sort": "+caughtAt",
- "host": None,
+ "sort" : "+caughtAt",
+ "host" : None,
"blocked": True,
- "limit": step
+ "limit" : step
}))
else:
# NOISY-DEBUG: print("DEBUG: Sending JSON API request to domain,step,counter:", domain, step, counter)
doc = post_json_api(domain,"/api/federation/instances", json.dumps({
- "sort": "+caughtAt",
- "host": None,
+ "sort" : "+caughtAt",
+ "host" : None,
"blocked": True,
- "limit": step,
- "offset": counter-1
+ "limit" : step,
+ "offset" : counter-1
}))
# NOISY-DEBUG: print("DEBUG: doc():", len(doc))
# NOISY-DEBUG: print("DEBUG: Returning for domain,blocked(),suspended():", domain, len(blocks["blocked"]), len(blocks["suspended"]))
return {
- "reject": blocks["blocked"],
+ "reject" : blocks["blocked"],
"followers_only": blocks["suspended"]
}