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