From 294947f200d82ecf344707467ea6ffb1beb84078 Mon Sep 17 00:00:00 2001 From: Levi <13402525+LeviSnoot@users.noreply.github.com> Date: Wed, 4 Jun 2025 01:26:47 +0200 Subject: [PATCH] revert refactor of `src/utils.py` --- src/utils.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/utils.py b/src/utils.py index 34b87a8..1816247 100644 --- a/src/utils.py +++ b/src/utils.py @@ -27,19 +27,14 @@ def get_sb( detail="SOCKS5 proxy with authentication is not supported. Check README for more info.", ) - sb_ctx = SB( + with SB( uc=True, headless=USE_HEADLESS, locale_code="en", ad_block=True, proxy=proxy, - ) - sb = sb_ctx.__enter__() - try: + ) as sb: yield sb - finally: - sb_ctx.__exit__(None, None, None) - def save_screenshot(sb: BaseCase):