This commit is contained in:
HuangHai
2026-01-13 14:54:02 +08:00
parent c36ab00318
commit 8815cf603e
4 changed files with 6 additions and 6 deletions

View File

@@ -417,9 +417,9 @@ async def get_station_list(d, service, uploader, max_scrolls=MAX_SCROLLS):
if stations and new_stations_processed == 0:
no_new_data_count += 1
logger.info(f"本页所有场站均已处理过,连续 {no_new_data_count} 页无新数据。")
# 【优化】由于滑动步长较小 (0.15),连续多页重复是正常的,将阈值调大到 10
if no_new_data_count >= 10:
logger.info("连续 10 页无新数据,判定为已到底或重复循环,提前结束。")
# 【优化】由于滑动步长已调大 (0.5),连续多页重复的可能性降低
if no_new_data_count >= 5:
logger.info("连续 5 页无新数据,判定为已到底或重复循环,提前结束。")
break
else:
no_new_data_count = 0