From d4d44a5b1ef8988dfd7ce072ece4e61fc420b44b Mon Sep 17 00:00:00 2001 From: KWON Date: Fri, 27 Jun 2025 14:23:51 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B8=B0=EC=A1=B4=20=EB=B0=A9=EC=8B=9D?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=B5=EA=B7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/weather_capture.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/weather_capture.py b/data/weather_capture.py index 47b9a4b..74d346e 100644 --- a/data/weather_capture.py +++ b/data/weather_capture.py @@ -57,12 +57,13 @@ try: driver.quit() exit(1) - # 캡처 대상 요소가 확실히 나타날 때까지 명시적 대기 + time.sleep(2) # 페이지 반영 대기 + + # 캡처 대상 요소 대기 후 찾기 target_element = wait.until(EC.presence_of_element_located( (By.XPATH, '/html/body/div[2]/section/div/div[2]') )) - # 저장 경로 설정 save_path = os.path.join(script_dir, f'weather_capture_{TODAY}.png')