mirror of
https://github.com/PaiGramTeam/fastapi_genshin_map.git
synced 2025-01-30 21:58:46 +00:00
🎨 更新
This commit is contained in:
parent
785e4f2bd2
commit
4fe8412b6e
@ -43,7 +43,12 @@ async def download_P0_img(
|
||||
return
|
||||
|
||||
URL = BASE + world[map_id] + '/{}_P0.webp'
|
||||
resp = await client.get(URL.format(f'{i}_{j}'))
|
||||
try:
|
||||
resp = await client.get(URL.format(f'{i}_{j}'))
|
||||
except Exception as e:
|
||||
logger.warning(f'请求失败, 可能不影响最终结果, 错误信息: {e}')
|
||||
return
|
||||
|
||||
if resp.status_code != 200:
|
||||
return
|
||||
|
||||
@ -87,7 +92,7 @@ async def make_P0_map(map_id: int) -> Image.Image:
|
||||
TASK.clear()
|
||||
|
||||
if map_id == 2:
|
||||
ox, oy = -2048, -1024
|
||||
ox, oy = -3072, -1024
|
||||
else:
|
||||
ox, oy = 0, 0
|
||||
big_img = Image.new('RGBA', (x * 256 + ox, y * 256 + oy))
|
||||
|
Loading…
Reference in New Issue
Block a user