From 428a5db51356c9575ce5b823d7ae21e7ad91cf0e Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 4 Jun 2026 12:51:14 +0000 Subject: [PATCH] =?UTF-8?q?Playwright=20tmp=20dirs=20are=20cleaned=20up=20?= =?UTF-8?q?after=20browser=20close=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pashub_fetcher/token_getter.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/pashub_fetcher/token_getter.py b/backend/pashub_fetcher/token_getter.py index 990e79d0..57338a6d 100644 --- a/backend/pashub_fetcher/token_getter.py +++ b/backend/pashub_fetcher/token_getter.py @@ -92,5 +92,12 @@ def get_token_from_local_storage( context.close() browser.close() + for pattern in ( + "/tmp/playwright-artifacts-*", + "/tmp/playwright_chromiumdev_profile-*", + ): + for path in glob.glob(pattern): + shutil.rmtree(path, ignore_errors=True) + if record_video and video_dir: logger.info(f"Video(s) saved in: {video_dir}")