Gerapy / GerapyPlaywright

Downloader Middleware to support Playwright in Scrapy & Gerapy
106 stars 24 forks source link

Fix leaking file descriptors by using the context manager #8

Closed xolan closed 2 years ago

xolan commented 2 years ago

I was running into OSError: [Errno 24] Too many open files while using this with scrapy for scraping a domain.

By using async_playwright() as a context manager, we ensure it's closed once finished. This fixes the issue.

Germey commented 2 years ago

Thanks for your contibution!

Germey commented 2 years ago

Released 0.2.4 new version for this fix~