Skip to content

Commit

Permalink
fix error when playwright's closing
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed May 4, 2023
1 parent be0a371 commit 63a1619
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion aioscrapy/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.12
1.2.13
10 changes: 7 additions & 3 deletions aioscrapy/core/downloader/handlers/playwright/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ def format_context_proxy(proxy) -> ProxySettings:

async def quit(self):
await self.page.close()
await self.context.close()
await self.browser.close()
await self.driver.stop()
try:
await self.context.close()
except:
pass
finally:
await self.browser.close()
await self.driver.stop()

async def get_cookies(self):
return {
Expand Down

0 comments on commit 63a1619

Please sign in to comment.