mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-07 12:50:03 +08:00
Update data_source.py
This commit is contained in:
@@ -90,6 +90,8 @@ async def search_online_setu(
|
|||||||
index = random.randint(1, 100000) if id_ is None else id_
|
index = random.randint(1, 100000) if id_ is None else id_
|
||||||
path_ = "temp" if not path_ else path_
|
path_ = "temp" if not path_ else path_
|
||||||
file = f"{index}_temp_setu.jpg" if not path_ else f"{index}.jpg"
|
file = f"{index}_temp_setu.jpg" if not path_ else f"{index}.jpg"
|
||||||
|
if not os.path.exists(f'{IMAGE_PATH}/path_'):
|
||||||
|
os.mkdir(f'{IMAGE_PATH}/path_')
|
||||||
async with aiofiles.open(
|
async with aiofiles.open(
|
||||||
f"{IMAGE_PATH}/{path_}/{file}", "wb"
|
f"{IMAGE_PATH}/{path_}/{file}", "wb"
|
||||||
) as f:
|
) as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user