2 from .database import DATABASE
3 from .http_debug import http_debug
6 ACTORS = DATABASE.get("actors", {})
7 async def fetch_actor(uri, force=False):
8 if uri in ACTORS and not force:
11 async with aiohttp.ClientSession(trace_configs=[http_debug()]) as session:
12 async with session.get(uri, headers={'Accept': 'application/activity+json'}) as resp:
13 ACTORS[uri] = (await resp.json(encoding='utf-8', content_type=None))
14 DATABASE["actors"] = ACTORS