From 406c8ac747110b2fb19ef7cf1a58f3804bd93992 Mon Sep 17 00:00:00 2001 From: Kyomotoi <0w0@imki.moe> Date: Thu, 13 Oct 2022 15:16:03 +0800 Subject: =?UTF-8?q?=F0=9F=8E=A8=20=E4=BC=98=E5=8C=96=E5=8C=85=E5=AF=BC?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/funny/data_source.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ATRI/plugins/funny') diff --git a/ATRI/plugins/funny/data_source.py b/ATRI/plugins/funny/data_source.py index 6144b11..18e0503 100644 --- a/ATRI/plugins/funny/data_source.py +++ b/ATRI/plugins/funny/data_source.py @@ -5,7 +5,7 @@ from random import choice, randint from nonebot.adapters.onebot.v11 import unescape from ATRI.service import Service -from ATRI.log import logger +from ATRI.log import log from ATRI.exceptions import RequestError from ATRI.utils import request from ATRI.utils import request, Translate @@ -27,13 +27,13 @@ class Funny(Service): file_name = "laugh.txt" path = FUNNY_DIR / file_name if not path.is_file(): - logger.warning("未发现笑话相关数据,正在下载并保存...") + log.warning("未发现笑话相关数据,正在下载并保存...") url = "https://jsd.imki.moe/gh/Kyomotoi/CDN@master/project/ATRI/laugh.txt" res = await request.get(url) context = res.text with open(path, "w", encoding="utf-8") as w: w.write(context) - logger.warning("完成") + log.warning("完成") with open(path, "r", encoding="utf-8") as r: for line in r: -- cgit v1.2.3