mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-Nonebot.git
synced 2026-04-01 22:04:51 +00:00
feat(data_source): 修复 日报文件名称
This commit is contained in:
parent
6e97aa3b4b
commit
9d321cd78b
1 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ async def save_img(data: bytes):
|
|||
:param data:
|
||||
:return:
|
||||
"""
|
||||
file_path = temp_path + f"{datetime.now().date()}.png"
|
||||
file_path = temp_path + f"{datetime.now().date()}日报.png"
|
||||
with open(file_path, "wb") as file:
|
||||
file.write(data)
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ class Report:
|
|||
async def get_report_image(cls) -> bytes:
|
||||
"""获取数据"""
|
||||
now = datetime.now()
|
||||
file = Path() / temp_path / f"{now.date()}.png"
|
||||
file = Path() / temp_path / f"{now.date()}日报.png"
|
||||
if os.path.exists(file):
|
||||
with file.open("rb") as image_file:
|
||||
return image_file.read()
|
||||
|
|
|
|||
Loading…
Reference in a new issue