# Language mapping X -> English
language_mapping = {
# English -> English
+ "filtered media" : "filtered_media",
"limited servers" : "followers_only",
+ "followers-only" : "followers_only",
+ "media removal" : "media_removal",
+ "media_removal" : "media_removal",
+ "media force-set as sensitive": "nsfw",
+ "nsfw" : "nsfw",
+ "reject" : "reject",
"suspended servers": "reject",
"silenced servers" : "silenced",
- "filtered media" : "filtered_media",
+ "removal from \"the whole known network\" timeline": "silenced",
}
def fetch_blocks(domain: str, nodeinfo_url: str) -> list:
rows = data["quarantined_instances_info"]["quarantined_instances"]
for blocked in rows:
logger.debug("blocked='%s' - BEFORE!", blocked)
- blocked = tidyup.domain(blocked)
reason = tidyup.reason(rows[blocked]["reason"])
+ blocked = tidyup.domain(blocked)
logger.debug("blocked='%s',reason='%s' - AFTER!", blocked, reason)
if blocked not in rows or "reason" not in rows[blocked]:
"filtered_media": [],
"followers_only": [],
"silenced" : [],
+ "nsfw" : [],
+ "media_removal" : [],
}
logger.debug("doc[]='%s'", type(doc))
logger.debug("domain='%s' de-obscured to '%s'", domain, row["domain"])
domain = row["domain"]
else:
- logger.debug("blocker='%s' has domain that cannot be deobfuscated.", blocker)
+ logger.warning("blocker='%s' has domain='%s' that cannot be deobfuscated.", blocker, domain)
instances.set_has_obfuscation(blocker, True)
elif domain.find("?") >= 0:
logger.debug("blocker='%s' uses obfuscated domains", blocker)
logger.debug("domain='%s' de-obscured to '%s'", domain, row["domain"])
domain = row["domain"]
else:
- logger.debug("blocker='%s' has domain that cannot be deobfuscated.", blocker)
+ logger.warning("blocker='%s' has domain='%s' that cannot be deobfuscated.", blocker, domain)
instances.set_has_obfuscation(blocker, True)
else:
logger.debug("domain='%s' is not obfuscated", domain)