Add sign status for Lagrange.Core

This commit is contained in:
2024-05-11 00:16:38 +08:00
parent 75a4d1fdcb
commit 205b69e5cb
12 changed files with 133 additions and 23 deletions

View File

@ -1,5 +1,6 @@
import datetime
import aiohttp
import httpx
import nonebot
from nonebot import require
@ -33,9 +34,9 @@ async def request_for_blacklist():
for plat in platforms:
for url in urls:
url += f"{plat}.txt"
async with httpx.AsyncClient() as client:
async with aiohttp.ClientSession() as client:
resp = await client.get(url)
blacklist_data[plat] = set(resp.text.splitlines())
blacklist_data[plat] = set((await resp.text()).splitlines())
blacklist = get_uni_set()
nonebot.logger.info("blacklists updated")