mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
Update __init__.py
This commit is contained in:
parent
d8a997e568
commit
2a6951426b
@ -45,6 +45,9 @@ async def update_image():
|
|||||||
if os.path.exists(f'{IMAGE_PATH}/genshin/daily_material.png'):
|
if os.path.exists(f'{IMAGE_PATH}/genshin/daily_material.png'):
|
||||||
os.remove(f'{IMAGE_PATH}/genshin/daily_material.png')
|
os.remove(f'{IMAGE_PATH}/genshin/daily_material.png')
|
||||||
browser = await get_browser()
|
browser = await get_browser()
|
||||||
|
if not browser:
|
||||||
|
logger.warning('获取 browser 失败,请部署至 linux 环境....')
|
||||||
|
return False
|
||||||
url = 'https://genshin.pub/daily'
|
url = 'https://genshin.pub/daily'
|
||||||
page = await browser.new_page()
|
page = await browser.new_page()
|
||||||
await page.goto(url, wait_until='networkidle', timeout=10000)
|
await page.goto(url, wait_until='networkidle', timeout=10000)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user