diff --git a/CHANGELOG.json b/CHANGELOG.json index 99b791e..7eee7dd 100644 --- a/CHANGELOG.json +++ b/CHANGELOG.json @@ -1,11 +1,35 @@ { "metadata": { - "lastUpdated": "2026-01-18T12:31:21Z", - "currentVersion": "1.0.1", + "lastUpdated": "2026-01-18T12:51:13Z", + "currentVersion": "1.0.2", "projectType": "python", - "totalReleases": 6 + "totalReleases": 7 }, "releases": [ + { + "version": "1.0.2", + "project_type": "python", + "date": "2026-01-18", + "pr_number": 17, + "raw_summary": "## Summary by CodeRabbit\n\n# 릴리스 노트\n\n* **Chores**\n * 버전을 v1.0.2로 업데이트했습니다.\n * 문서를 최신 버전 정보로 업데이트했습니다.\n\n* **Bug Fixes**\n * 지도 데이터 수집 시 안정성을 개선했습니다.\n * 주소 추출 로직을 강화하고 더 견고한 오류 처리를 추가했습니다.", + "parsed_changes": { + "chores": { + "title": "Chores", + "items": [ + "버전을 v1.0.2로 업데이트했습니다.", + "문서를 최신 버전 정보로 업데이트했습니다." + ] + }, + "bug_fixes": { + "title": "Bug Fixes", + "items": [ + "지도 데이터 수집 시 안정성을 개선했습니다.", + "주소 추출 로직을 강화하고 더 견고한 오류 처리를 추가했습니다." + ] + } + }, + "parse_method": "markdown" + }, { "version": "1.0.1", "project_type": "python", diff --git a/CHANGELOG.md b/CHANGELOG.md index caf4140..e989677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,21 @@ # Changelog -**현재 버전:** 1.0.1 -**마지막 업데이트:** 2026-01-18T12:31:21Z +**현재 버전:** 1.0.2 +**마지막 업데이트:** 2026-01-18T12:51:13Z + +--- + +## [1.0.2] - 2026-01-18 + +**PR:** #17 + +**Chores** +- 버전을 v1.0.2로 업데이트했습니다. +- 문서를 최신 버전 정보로 업데이트했습니다. + +**Bug Fixes** +- 지도 데이터 수집 시 안정성을 개선했습니다. +- 주소 추출 로직을 강화하고 더 견고한 오류 처리를 추가했습니다. --- diff --git a/README.md b/README.md index de0fb34..d41b43a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # MapSee-AI -## 최신 버전 : v0.1.3 (2026-01-18) +## 최신 버전 : v1.0.1 (2026-01-18) [전체 버전 기록 보기](CHANGELOG.md) diff --git a/src/services/scraper/platforms/naver_map_scraper.py b/src/services/scraper/platforms/naver_map_scraper.py index 7d2473a..9c23079 100644 --- a/src/services/scraper/platforms/naver_map_scraper.py +++ b/src/services/scraper/platforms/naver_map_scraper.py @@ -2,7 +2,6 @@ 네이버 지도 장소 스크래핑 로직 """ import logging -import asyncio from urllib.parse import quote from playwright.async_api import async_playwright @@ -14,7 +13,6 @@ parse_rating, extract_naver_place_id_from_url, SCRAPE_TIMEOUT_MS, - PAGE_LOAD_WAIT_SEC, ELEMENT_WAIT_TIMEOUT_MS, MAX_IMAGE_COUNT, ) @@ -107,9 +105,8 @@ async def search_and_scrape(self, query: str) -> NaverPlaceInfo: logger.info("첫 번째 결과 클릭 완료, 상세 페이지 로드 대기...") - # [5/7] 상세 페이지 로드 대기 + # [5/7] 상세 페이지 로드 대기 (entryIframe이 나타날 때까지) logger.info("[5/7] 상세 페이지 로드 대기...") - await asyncio.sleep(PAGE_LOAD_WAIT_SEC) # entryIframe 대기 logger.info("entryIframe 대기...") @@ -149,8 +146,22 @@ async def search_and_scrape(self, query: str) -> NaverPlaceInfo: logger.debug(f"entry_frame URL: {entry_frame.url}") - # 추가 대기: DOM이 완전히 로드될 때까지 - await asyncio.sleep(2) + # DOM 완전 로드 대기 (주소 요소가 나타날 때까지) + try: + await entry_frame.wait_for_selector('span.LDgIH', timeout=ELEMENT_WAIT_TIMEOUT_MS) + except Exception: + pass # 주소가 없는 장소도 있으므로 무시 + + # "찾아가는 길" 더보기 버튼 클릭 (전체 텍스트 펼치기) + try: + directions_expand_button = entry_frame.locator('a.xHaT3[aria-expanded="false"]') + if await directions_expand_button.count() > 0: + await directions_expand_button.first.click() + # 펼쳐진 상태 대기 + await entry_frame.wait_for_selector('a.xHaT3[aria-expanded="true"]', timeout=2000) + logger.debug("찾아가는 길 더보기 클릭 완료") + except Exception as error: + logger.debug(f"찾아가는 길 더보기 클릭 실패 (무시): {error}") # iframe 내에서 JavaScript 실행 info = await entry_frame.evaluate(f'''() => {{ @@ -204,8 +215,10 @@ async def search_and_scrape(self, query: str) -> NaverPlaceInfo: const subwayElement = document.querySelector('div.nZapA'); result.subway_info = subwayElement ? subwayElement.textContent.trim() : null; - // 찾아가는 길 - const directionsElement = document.querySelector('span.zPfVt') || + // 찾아가는 길 (전체 텍스트 - 펼쳐진 상태 우선) + const expandedDirections = document.querySelector('a.xHaT3[aria-expanded="true"] span.zPfVt'); + const directionsElement = expandedDirections || + document.querySelector('span.zPfVt') || document.querySelector('.place_section_content .zPfVt'); result.directions_text = directionsElement ? directionsElement.textContent.trim() : null; diff --git a/version.yml b/version.yml index 6bd17ea..63fc0c0 100644 --- a/version.yml +++ b/version.yml @@ -34,11 +34,11 @@ # - 버전은 항상 높은 버전으로 자동 동기화됩니다 # =================================================================== -version: "1.0.1" -version_code: 17 # app build number +version: "1.0.2" +version_code: 18 # app build number project_type: "python" # spring, flutter, react, react-native, react-native-expo, node, python, basic metadata: - last_updated: "2026-01-18 12:29:56" + last_updated: "2026-01-18 12:49:53" last_updated_by: "Cassiiopeia" default_branch: "main" integrated_from: "SUH-DEVOPS-TEMPLATE"