From 6987c26b11446c0dca00c7bc4763ad43c3480680 Mon Sep 17 00:00:00 2001 From: Sangha Lee Date: Mon, 4 Aug 2025 11:54:48 +0900 Subject: [PATCH] fix: forgot to store file hash --- utils/scraper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/scraper.py b/utils/scraper.py index a267985..cc4ed0b 100644 --- a/utils/scraper.py +++ b/utils/scraper.py @@ -217,7 +217,9 @@ class Scraper(ClientSession): attachment.source_filename = response.content_disposition.filename attachment.source_suffix = Path(attachment.source_filename).suffix - saved_path = save_dir / f'{hash.hexdigest()}{attachment.source_suffix}' + attachment.hash = hash.hexdigest() + + saved_path = save_dir / f'{attachment.hash}{attachment.source_suffix}' # 임시로 받은 파일 옮기기 if not saved_path.exists():