This commit is contained in:
HuangHai
2026-01-17 16:02:29 +08:00
parent 24380767a4
commit ec680d1f92
8 changed files with 13 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
# 采集配置
SCROLL_DISTANCE_RATIO = 0.5
MAX_STATIONS_COUNT = 2
MAX_STATIONS_COUNT = 20
FIRST_RUN_ONLY_ONE_STATION = True
REDIS_STATION_EXPIRE = 120
DATA_RETENTION_DAYS = 365

View File

@@ -243,7 +243,17 @@ async def get_station_list(d, service, uploader, max_stations_count=MAX_STATIONS
new_stations_processed_in_page += 1
total_new_processed_count += 1
click_x, click_y = card["click_point"]
click_x = st.get("uia_center_x")
click_y = st.get("uia_center_y")
if click_x is None or click_y is None:
cp = card.get("click_point") or (None, None)
if isinstance(cp, (list, tuple)) and len(cp) >= 2:
click_x, click_y = cp[0], cp[1]
if click_x is None or click_y is None:
logger.warning(f"场站 '{station_name}' 缺少有效点击坐标,跳过。")
continue
logger.info(f"准备处理场站: {station_name}, 点击坐标: ({click_x}, {click_y})")
d.click(int(click_x), int(click_y))