기존 방식으로 복귀
This commit is contained in:
@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user