From 6a0077b80dce4f73ad60f2b971af7a10590be339 Mon Sep 17 00:00:00 2001 From: Dayoung Kang <93754504+riverallzero@users.noreply.github.com> Date: Sun, 22 Oct 2023 23:10:17 +0900 Subject: [PATCH] Update crawler.py --- crawler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crawler.py b/crawler.py index 8392340..da745f4 100644 --- a/crawler.py +++ b/crawler.py @@ -23,7 +23,9 @@ receiver_email = 'kallzero1008@jbnu.ac.kr' -file_path = 'last_no.txt' +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) +file_path = os.path.join(BASE_DIR, 'last_no.txt') + if os.path.exists(file_path): with open(file_path, 'r') as file: last_no = int(file.read())