make test for playwright more robust #791

This commit is contained in:
Paul Gauthier 2024-07-03 21:37:05 -03:00
parent 9d02628cf8
commit 644ec6f964

View file

@ -91,12 +91,12 @@ class Scraper:
if self.playwright_available is not None:
return
with sync_playwright() as p:
try:
try:
with sync_playwright() as p:
p.chromium.launch()
self.playwright_available = True
except Exception:
self.playwright_available = False
except Exception:
self.playwright_available = False
def get_playwright_instructions(self):
if self.playwright_available in (True, None):