diff --git a/harambe/core.py b/harambe/core.py index a5c1ec4..19ead43 100644 --- a/harambe/core.py +++ b/harambe/core.py @@ -170,7 +170,13 @@ async def run( async with async_playwright() as p: browser = await p.chromium.launch(headless=headless) - ctx = await browser.new_context() + ctx = await browser.new_context( + viewport={"width": 1280, "height": 1024}, + ignore_https_errors=True, + user_agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36" + " (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", + ) + ctx.set_default_timeout(60000) await ctx.route("**/*", UnnecessaryResourceHandler().handle)