修复正确请求到api后没有正确关闭浏览器标签页导致内存溢出的bug

This commit is contained in:
2022-08-07 00:42:59 +08:00
parent 2be62140ac
commit 2aef281e8c

View File

@@ -125,6 +125,7 @@ async def request(url: str) -> tuple[bool, bool, dict[str, Any]]:
except JSONDecodeError:
await page.wait_for_timeout(1000)
else:
await page.close()
return (True, data['success'], data)
if attempts >= 60:
break