mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
Update query_resource.py
This commit is contained in:
parent
12212ecf65
commit
96d1bd3575
@ -153,7 +153,7 @@ async def download_map_init(
|
|||||||
global CENTER_POINT, MAP_RATIO
|
global CENTER_POINT, MAP_RATIO
|
||||||
map_path.mkdir(exist_ok=True, parents=True)
|
map_path.mkdir(exist_ok=True, parents=True)
|
||||||
_map = map_path / "map.png"
|
_map = map_path / "map.png"
|
||||||
if os.path.getsize(_map) > 1024 * 1024 * 30:
|
if _map.exists() and os.path.getsize(_map) > 1024 * 1024 * 30:
|
||||||
_map.unlink()
|
_map.unlink()
|
||||||
async with session.get(MAP_URL, timeout=5) as response:
|
async with session.get(MAP_URL, timeout=5) as response:
|
||||||
if response.status == 200:
|
if response.status == 200:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user