'commit'
This commit is contained in:
@@ -209,7 +209,7 @@ class TeLaiDianCrawler(BaseCrawler):
|
||||
logger.info(f"跳过已处理场站 (Redis): {name}")
|
||||
continue
|
||||
|
||||
logger.info(f"处理场站: {name} (坐标: {point})")
|
||||
logger.info(f"处理场站: {name} (坐标: {point}, 距离: {station.get('distance')})")
|
||||
|
||||
# 点击进入详情
|
||||
d.click(point[0], point[1])
|
||||
@@ -453,6 +453,14 @@ class TeLaiDianCrawler(BaseCrawler):
|
||||
continue
|
||||
if res:
|
||||
for p in res:
|
||||
# 标准化时间格式,确保 0:00 -> 00:00
|
||||
for key in ['start', 'end']:
|
||||
val = p.get(key)
|
||||
if val and ':' in val:
|
||||
parts = val.split(':')
|
||||
if len(parts) == 2:
|
||||
p[key] = f"{int(parts[0]):02d}:{int(parts[1]):02d}"
|
||||
|
||||
is_duplicate = False
|
||||
for existing in all_prices:
|
||||
if p.get('start') == existing.get('start') and p.get('end') == existing.get('end'):
|
||||
@@ -500,7 +508,7 @@ class TeLaiDianCrawler(BaseCrawler):
|
||||
station_name_clean = clean_station_name(station_name)
|
||||
logger.info(f"[详情页] 虽未获取价格,但已获取地址,尝试仅保存基础信息: {station_name_clean} | {address}")
|
||||
try:
|
||||
await self.service.save_station_profile_only(station_name_clean, address)
|
||||
await self.service.save_station_profile_only(station_name_clean, address, distance=distance)
|
||||
except Exception as e:
|
||||
logger.error(f"[详情页] 仅保存基础信息失败: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user