From e0f04d0ae77e461fe85b282efe868e0956fe55ec Mon Sep 17 00:00:00 2001 From: KWON Date: Fri, 27 Jun 2025 11:53:13 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=A9=EB=8F=8C=20=EB=B0=A9=EC=A7=80?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=9C=20=EC=9E=84=EC=8B=9C=20=EB=94=94?= =?UTF-8?q?=EB=A0=89=ED=86=A0=EB=A6=AC=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/weather_capture.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/data/weather_capture.py b/data/weather_capture.py index 8dd1a9a..7554bb0 100644 --- a/data/weather_capture.py +++ b/data/weather_capture.py @@ -6,6 +6,17 @@ from selenium.webdriver.support import expected_conditions as EC from datetime import datetime import os import time +import tempfile + +options = Options() +options.add_argument('--headless') +options.add_argument('--window-size=1802,1467') + +# 임시 사용자 데이터 디렉토리 생성 +temp_user_data_dir = tempfile.mkdtemp() +options.add_argument(f'--user-data-dir={temp_user_data_dir}') + +driver = webdriver.Chrome(options=options) # 현재 스크립트 경로 기준 저장 script_dir = os.path.dirname(os.path.abspath(__file__))