카페, 식당 템플릿 적용
This commit is contained in:
1 parent
76485ebbcc
commit
e53084ed17
4 files changed
+45
-19
No files matched your search
@@ -18,8 +18,9 @@ class NvMapPwScraper():
|
||||
_context = None
|
||||
_win_width = 1280
|
||||
_win_height = 720
|
||||
_max_retry = 3
|
||||
_timeout = 60 # place id timeout threshold seconds
|
||||
_max_retry = 3
|
||||
_timeout = 30 # place id timeout threshold seconds
|
||||
_retry_delay_ms = 1500 # 검색 실패 후 재시도 전 대기시간 (네이버 요청 밀도 완화)
|
||||
|
||||
# instance var
|
||||
page = None
|
||||
@@ -422,12 +423,14 @@ patchedGetter.toString();''')
|
||||
# 2차 시도: 정제 주소 + 업체명
|
||||
refined = self._refine_address(address)
|
||||
if refined != address:
|
||||
await self.page.wait_for_timeout(self._retry_delay_ms)
|
||||
logger.info(f"[REFINE] 주소 정제: '{address}' → '{refined}'")
|
||||
result = await self._try_search(refined, title)
|
||||
if result:
|
||||
return result
|
||||
|
||||
# 3차 시도: 업체명만으로 검색
|
||||
await self.page.wait_for_timeout(self._retry_delay_ms)
|
||||
logger.info(f"[RETRY] 업체명만으로 재시도: '{title}'")
|
||||
result = await self._try_search("", title)
|
||||
if result:
|
||||
|
||||
Reference in new issue
Block a user