'commit'
This commit is contained in:
@@ -17,6 +17,7 @@ import uiautomator2 as u2
|
||||
from Apps.AiTeJiYiChong import Kit
|
||||
from Apps.AiTeJiYiChong.Kit import take_screenshot, setup_logger
|
||||
from Apps.AiTeJiYiChong.ReadImageKit import ReadImageKit
|
||||
from Apps.AiTeJiYiChong.FirstPageKit import run_ocr_rect
|
||||
from Util.RedisKit import RedisKit
|
||||
from Apps.AiTeJiYiChong.Service import AiTeJiYiChongService
|
||||
from Config.Config import TEMP_IMAGE_DIR
|
||||
@@ -106,224 +107,226 @@ async def get_station_list(d, service, max_stations_count=MAX_STATIONS_COUNT):
|
||||
|
||||
logger.info(f"列表页截图已完成: {screenshot_path}")
|
||||
|
||||
# 2. 执行本地图形学分析,生成 _vl.jpg 和 .json
|
||||
logger.info("正在执行图形学切片分析...")
|
||||
json_metadata = Kit.crop_cards_from_image(screenshot_path, save_debug=True)
|
||||
|
||||
vl_img_path = screenshot_path.replace(".jpg", "_vl.jpg")
|
||||
# 2. 使用 OCR+LLM 识别当前页所有场站卡片
|
||||
logger.info("正在使用 OCR+LLM 识别场站列表...")
|
||||
try:
|
||||
stations_page = await run_ocr_rect(screenshot_path)
|
||||
except Exception as e:
|
||||
logger.error(f"OCR+LLM 识别列表页异常: {e}")
|
||||
stations_page = None
|
||||
|
||||
if not json_metadata or not json_metadata.get("cards"):
|
||||
logger.warning("未识别到任何卡片,跳过当前页")
|
||||
if not stations_page:
|
||||
logger.warning("OCR+LLM 未识别到任何场站,跳过当前页")
|
||||
continue
|
||||
|
||||
# 3. 后台异步上传 _vl.jpg 供以后参考 (如果需要,目前仅本地处理)
|
||||
|
||||
# 4. 调用 VL 模型识别场站信息 (整页识别)
|
||||
logger.info("正在调用 VL 模型识别场站信息 (整页识别)...")
|
||||
# 优先使用带绿框的图片进行识别
|
||||
img_to_process = vl_img_path if os.path.exists(vl_img_path) else screenshot_path
|
||||
stations = await service.process_station_list_vl(img_to_process, json_metadata, device_info=device_info, max_count=max_stations_count - total_new_processed_count)
|
||||
logger.info(f"本页识别到 {len(stations)} 个有效场站")
|
||||
ad_top_y = int(h * (1 - BOTTOM_SAFE_EXCLUDE_RATIO))
|
||||
|
||||
ad_top_y_norm = 1.0 - BOTTOM_SAFE_EXCLUDE_RATIO
|
||||
|
||||
# 5. 遍历处理本页所有场站
|
||||
# 3. 遍历处理本页所有场站
|
||||
new_stations_processed_in_page = 0
|
||||
if json_metadata.get("cards") and stations:
|
||||
for card_idx, card in enumerate(json_metadata["cards"]):
|
||||
# 检查是否已达到最大采集数量(按新采集的场站数量限制)
|
||||
if stations_page:
|
||||
stations_page_sorted = []
|
||||
for st in stations_page:
|
||||
rect = st.get("rect") or []
|
||||
if not isinstance(rect, (list, tuple)) or len(rect) < 4:
|
||||
continue
|
||||
stations_page_sorted.append(st)
|
||||
stations_page_sorted.sort(key=lambda s: (s.get("rect") or [0, 0, 0, 0])[1])
|
||||
|
||||
for st in stations_page_sorted:
|
||||
if total_new_processed_count >= max_stations_count:
|
||||
break
|
||||
|
||||
# 检查索引是否越界 (VL 模型可能返回的数组长度不一致)
|
||||
if card_idx < len(stations) and stations[card_idx]:
|
||||
station = stations[card_idx]
|
||||
station_name = station.get("station_name")
|
||||
if not station_name: continue
|
||||
|
||||
# 只要是有效的场站,就计入已遇到数量
|
||||
total_encountered_count += 1
|
||||
station_name = st.get("station_name") or st.get("name")
|
||||
rect = st.get("rect") or []
|
||||
click_point = st.get("click_point") or st.get("click") or []
|
||||
|
||||
# 检查 Redis 去重
|
||||
if await is_already_crawled(redis_kit, station_name):
|
||||
logger.info(f"场站 {station_name} 匹配到已处理记录,跳过。({total_encountered_count}/{max_stations_count})")
|
||||
continue
|
||||
if not station_name or not isinstance(rect, (list, tuple)) or len(rect) < 4:
|
||||
continue
|
||||
if not isinstance(click_point, (list, tuple)) or len(click_point) < 2:
|
||||
continue
|
||||
|
||||
# 检查是否被遮挡或太靠近底部
|
||||
card_bottom = card["bounds_norm"]["bottom"]
|
||||
if card_bottom > ad_top_y_norm:
|
||||
logger.warning(f"场站 '{station_name}' 被遮挡或太靠近底部 (Bottom {card_bottom:.2f} > {ad_top_y_norm}),留待下次滚动处理。")
|
||||
# 还没处理,不能算作已遇到
|
||||
total_encountered_count -= 1
|
||||
continue
|
||||
x1, y1, x2, y2 = rect[0], rect[1], rect[2], rect[3]
|
||||
if not (0 <= x1 < x2 <= w and 0 <= y1 < y2 <= h):
|
||||
logger.warning(f"场站 '{station_name}' 的矩形越界,跳过: rect={rect}, image=({w},{h})")
|
||||
continue
|
||||
|
||||
# 正常处理新场站
|
||||
click_x, click_y = card["click_point"]
|
||||
current_idx = total_new_processed_count + 1
|
||||
remaining = max_stations_count - current_idx
|
||||
logger.info(f"--- [进度: {current_idx}/{max_stations_count}, 剩余: {remaining}] 发现新场站 '{station_name}',开始处理... ---")
|
||||
new_stations_processed_in_page += 1
|
||||
total_new_processed_count += 1
|
||||
d.click(click_x, click_y)
|
||||
|
||||
# 等待二级页面加载
|
||||
await asyncio.sleep(WAIT_DETAIL_PAGE_LOAD)
|
||||
|
||||
should_back_to_list = True
|
||||
click_x, click_y = int(click_point[0]), int(click_point[1])
|
||||
if not (x1 <= click_x <= x2 and y1 <= click_y <= y2):
|
||||
logger.warning(f"场站 '{station_name}' 点击点不在矩形内部,跳过: click={click_point}, rect={rect}")
|
||||
continue
|
||||
|
||||
# 截取二级页面图
|
||||
detail_uuid = f"detail_{station_name}_{image_uuid}"
|
||||
detail_path = take_screenshot(d, detail_uuid, save_dir=TEMP_IMAGE_DIR)
|
||||
|
||||
# 后台分析详情页基础数据
|
||||
logger.info(f"已启动后台分析详情页: {station_name}")
|
||||
|
||||
async def detail_task_wrapper(p, name):
|
||||
try:
|
||||
await service.process_station_detail(p, station_name=name)
|
||||
if os.path.exists(p): os.remove(p)
|
||||
except Exception as ex:
|
||||
logger.error(f"详情页分析异常 ({name}): {ex}")
|
||||
total_encountered_count += 1
|
||||
|
||||
task_detail = asyncio.create_task(detail_task_wrapper(detail_path, station_name))
|
||||
background_tasks.append(task_detail)
|
||||
if await is_already_crawled(redis_kit, station_name):
|
||||
logger.info(f"场站 {station_name} 匹配到已处理记录,跳过。({total_encountered_count}/{max_stations_count})")
|
||||
continue
|
||||
|
||||
# 4. 寻找分时价格入口并进入三级页面
|
||||
# 【优化】梯级识别策略:优先模板匹配 (timePrice.jpg),失败则降级为 VL 识别
|
||||
template_time_price = os.path.join(os.path.dirname(__file__), "Template", "timePrice.jpg")
|
||||
|
||||
# 记录点击前的页面特征,用于验证是否成功进入三级页面
|
||||
before_click_md5 = Kit.get_image_content_md5(detail_path)
|
||||
|
||||
entered_price_page = False
|
||||
click_pos = None
|
||||
|
||||
if y2 > ad_top_y:
|
||||
logger.info(f"场站 '{station_name}' 底部靠近屏幕底部 (y2={y2}, ad_top_y={ad_top_y}),留待下次滚动处理。")
|
||||
total_encountered_count -= 1
|
||||
continue
|
||||
|
||||
current_idx = total_new_processed_count + 1
|
||||
remaining = max_stations_count - current_idx
|
||||
logger.info(f"--- [进度: {current_idx}/{max_stations_count}, 剩余: {remaining}] 发现新场站 '{station_name}',开始处理... ---")
|
||||
new_stations_processed_in_page += 1
|
||||
total_new_processed_count += 1
|
||||
d.click(click_x, click_y)
|
||||
|
||||
await asyncio.sleep(WAIT_DETAIL_PAGE_LOAD)
|
||||
|
||||
should_back_to_list = True
|
||||
|
||||
detail_uuid = f"detail_{station_name}_{image_uuid}"
|
||||
detail_path = take_screenshot(d, detail_uuid, save_dir=TEMP_IMAGE_DIR)
|
||||
|
||||
logger.info(f"已启动后台分析详情页: {station_name}")
|
||||
|
||||
async def detail_task_wrapper(p, name):
|
||||
try:
|
||||
# 1. 尝试模板匹配
|
||||
if os.path.exists(template_time_price):
|
||||
match_res = d.image.match(template_time_price)
|
||||
if match_res:
|
||||
# 兼容 uiautomator2 不同版本的返回结果 (Match对象或dict)
|
||||
if hasattr(match_res, 'point') and match_res.point:
|
||||
click_pos = match_res.point
|
||||
elif isinstance(match_res, dict):
|
||||
if 'point' in match_res and match_res['point']:
|
||||
click_pos = match_res['point']
|
||||
elif 'x' in match_res and 'y' in match_res:
|
||||
click_pos = (match_res['x'], match_res['y'])
|
||||
elif isinstance(match_res, (list, tuple)) and len(match_res) >= 2:
|
||||
click_pos = (match_res[0], match_res[1])
|
||||
|
||||
if click_pos:
|
||||
logger.info(f"通过 timePrice.jpg 成功找到!坐标: {click_pos}")
|
||||
|
||||
# 如果模板匹配未成功解析坐标,或者匹配直接失败,则降级到 VL
|
||||
if not click_pos:
|
||||
logger.info("模板匹配未找到或解析失败,降级使用 VL 识别...")
|
||||
res = await ReadImageKit.find_time_price_button_coordinate(detail_path, device_info=device_info)
|
||||
if res.get("uia_center_x"):
|
||||
click_pos = (res.get("uia_center_x"), res.get("uia_center_y"))
|
||||
logger.info(f"VL 识别成功找到 '分时价格' 按钮: {click_pos}")
|
||||
await service.process_station_detail(p, station_name=name)
|
||||
if os.path.exists(p): os.remove(p)
|
||||
except Exception as ex:
|
||||
logger.error(f"详情页分析异常 ({name}): {ex}")
|
||||
|
||||
if click_pos:
|
||||
click_x, click_y = int(click_pos[0]), int(click_pos[1])
|
||||
bottom_safe_y = int(h * (1 - BOTTOM_SAFE_EXCLUDE_RATIO))
|
||||
if click_y >= bottom_safe_y:
|
||||
logger.warning(f"'分时价格'按钮识别坐标 ({click_x}, {click_y}) 落在底部安全区域 (>= {bottom_safe_y}),为避免误触底部扫码/导航按钮,本次不点击。")
|
||||
else:
|
||||
d.click(click_x, click_y)
|
||||
await asyncio.sleep(0.5)
|
||||
task_detail = asyncio.create_task(detail_task_wrapper(detail_path, station_name))
|
||||
background_tasks.append(task_detail)
|
||||
|
||||
# 4. 寻找分时价格入口并进入三级页面
|
||||
# 【优化】梯级识别策略:优先模板匹配 (timePrice.jpg),失败则降级为 VL 识别
|
||||
template_time_price = os.path.join(os.path.dirname(__file__), "Template", "timePrice.jpg")
|
||||
|
||||
# 记录点击前的页面特征,用于验证是否成功进入三级页面
|
||||
before_click_md5 = Kit.get_image_content_md5(detail_path)
|
||||
|
||||
entered_price_page = False
|
||||
click_pos = None
|
||||
|
||||
try:
|
||||
# 1. 尝试模板匹配
|
||||
if os.path.exists(template_time_price):
|
||||
match_res = d.image.match(template_time_price)
|
||||
if match_res:
|
||||
# 兼容 uiautomator2 不同版本的返回结果 (Match对象或dict)
|
||||
if hasattr(match_res, 'point') and match_res.point:
|
||||
click_pos = match_res.point
|
||||
elif isinstance(match_res, dict):
|
||||
if 'point' in match_res and match_res['point']:
|
||||
click_pos = match_res['point']
|
||||
elif 'x' in match_res and 'y' in match_res:
|
||||
click_pos = (match_res['x'], match_res['y'])
|
||||
elif isinstance(match_res, (list, tuple)) and len(match_res) >= 2:
|
||||
click_pos = (match_res[0], match_res[1])
|
||||
|
||||
# 检查页面是否真的变化了
|
||||
after_click_path = take_screenshot(d, f"check_{detail_uuid}", save_dir=TEMP_IMAGE_DIR)
|
||||
after_click_md5 = Kit.get_image_content_md5(after_click_path)
|
||||
|
||||
if before_click_md5 != after_click_md5:
|
||||
entered_price_page = True
|
||||
price_screenshots = []
|
||||
|
||||
logger.info("正在向上滚动价格列表到顶部 (快速多次滚动以尽快看到 00:00)...")
|
||||
max_scroll_up_to_top = 10
|
||||
for i in range(max_scroll_up_to_top):
|
||||
before_scroll_path = take_screenshot(d, f"aite_price_up_{i}", save_dir=TEMP_IMAGE_DIR)
|
||||
before_scroll_md5 = Kit.get_image_content_md5(before_scroll_path)
|
||||
|
||||
d.swipe_ext("down", scale=0.85)
|
||||
await asyncio.sleep(0.3)
|
||||
|
||||
after_scroll_path = take_screenshot(d, f"aite_price_up_after_{i}", save_dir=TEMP_IMAGE_DIR)
|
||||
after_scroll_md5 = Kit.get_image_content_md5(after_scroll_path)
|
||||
|
||||
if os.path.exists(before_scroll_path): os.remove(before_scroll_path)
|
||||
if os.path.exists(after_scroll_path): os.remove(after_scroll_path)
|
||||
|
||||
if before_scroll_md5 == after_scroll_md5:
|
||||
logger.info(f"价格列表已到达顶部 (滚动次数: {i})")
|
||||
break
|
||||
|
||||
logger.info("正在从顶部开始向下逐页截图...")
|
||||
max_scroll_down_pages = 10
|
||||
for p_idx in range(1, max_scroll_down_pages + 1):
|
||||
p_shot = take_screenshot(d, f"price_scroll_{p_idx}_{station_name}", save_dir=TEMP_IMAGE_DIR)
|
||||
|
||||
before_dn_md5 = Kit.get_image_content_md5(p_shot)
|
||||
d.swipe_ext("up", scale=0.8)
|
||||
await asyncio.sleep(0.3)
|
||||
|
||||
check_dn_path = take_screenshot(d, f"check_dn_{p_idx}", save_dir=TEMP_IMAGE_DIR)
|
||||
after_dn_md5 = Kit.get_image_content_md5(check_dn_path)
|
||||
if os.path.exists(check_dn_path): os.remove(check_dn_path)
|
||||
|
||||
price_screenshots.append(p_shot)
|
||||
|
||||
if before_dn_md5 == after_dn_md5:
|
||||
logger.info(f"价格列表已到达底部 (共抓取页数: {p_idx})")
|
||||
break
|
||||
|
||||
# 后台处理价格图片
|
||||
logger.info(f"已启动后台分析价格页: {station_name},共 {len(price_screenshots)} 张图")
|
||||
task_price = asyncio.create_task(analyze_prices_background(service, station_name, price_screenshots))
|
||||
background_tasks.append(task_price)
|
||||
|
||||
# 立即返回
|
||||
d.press("back")
|
||||
await asyncio.sleep(0.5)
|
||||
|
||||
# 检查返回后的页面状态
|
||||
check_back_path = take_screenshot(d, f"check_back_{detail_uuid}", save_dir=TEMP_IMAGE_DIR)
|
||||
|
||||
check_list_md5 = Kit.get_image_content_md5(
|
||||
check_back_path,
|
||||
top_ratio=SAFE_EXCLUDE_RATIO,
|
||||
bottom_ratio=BOTTOM_SAFE_EXCLUDE_RATIO
|
||||
)
|
||||
check_detail_md5 = Kit.get_image_content_md5(check_back_path)
|
||||
|
||||
if os.path.exists(check_back_path): os.remove(check_back_path)
|
||||
|
||||
if check_list_md5 == current_md5:
|
||||
logger.info("检测到已直接返回列表页,跳过后续返回操作。")
|
||||
should_back_to_list = False
|
||||
elif check_detail_md5 == before_click_md5:
|
||||
logger.info("检测到返回详情页,需执行第二次返回。")
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"处理三级页面详情异常 ({station_name}): {e}")
|
||||
|
||||
# 从二级页面返回列表页
|
||||
if should_back_to_list:
|
||||
d.press("back")
|
||||
await asyncio.sleep(0.8)
|
||||
if click_pos:
|
||||
logger.info(f"通过 timePrice.jpg 成功找到!坐标: {click_pos}")
|
||||
|
||||
# 记录 Redis
|
||||
full_name_key = f"crawled:aite:{Kit.clean_station_name(station_name)}"
|
||||
await redis_kit.set_data(full_name_key, "1", expire=REDIS_STATION_EXPIRE)
|
||||
# 如果模板匹配未成功解析坐标,或者匹配直接失败,则降级到 VL
|
||||
if not click_pos:
|
||||
logger.info("模板匹配未找到或解析失败,降级使用 VL 识别...")
|
||||
res = await ReadImageKit.find_time_price_button_coordinate(detail_path, device_info=device_info)
|
||||
if res.get("uia_center_x"):
|
||||
click_pos = (res.get("uia_center_x"), res.get("uia_center_y"))
|
||||
logger.info(f"VL 识别成功找到 '分时价格' 按钮: {click_pos}")
|
||||
|
||||
if FIRST_RUN_ONLY_ONE_STATION:
|
||||
logger.info("已完成首个场站的全流程采集,根据配置退出艾特吉易充爬取任务。")
|
||||
break
|
||||
if click_pos:
|
||||
click_x, click_y = int(click_pos[0]), int(click_pos[1])
|
||||
bottom_safe_y = int(h * (1 - BOTTOM_SAFE_EXCLUDE_RATIO))
|
||||
if click_y >= bottom_safe_y:
|
||||
logger.warning(f"'分时价格'按钮识别坐标 ({click_x}, {click_y}) 落在底部安全区域 (>= {bottom_safe_y}),为避免误触底部扫码/导航按钮,本次不点击。")
|
||||
else:
|
||||
d.click(click_x, click_y)
|
||||
await asyncio.sleep(0.5)
|
||||
|
||||
# 检查页面是否真的变化了
|
||||
after_click_path = take_screenshot(d, f"check_{detail_uuid}", save_dir=TEMP_IMAGE_DIR)
|
||||
after_click_md5 = Kit.get_image_content_md5(after_click_path)
|
||||
|
||||
if before_click_md5 != after_click_md5:
|
||||
entered_price_page = True
|
||||
price_screenshots = []
|
||||
|
||||
logger.info("正在向上滚动价格列表到顶部 (快速多次滚动以尽快看到 00:00)...")
|
||||
max_scroll_up_to_top = 10
|
||||
for i in range(max_scroll_up_to_top):
|
||||
before_scroll_path = take_screenshot(d, f"aite_price_up_{i}", save_dir=TEMP_IMAGE_DIR)
|
||||
before_scroll_md5 = Kit.get_image_content_md5(before_scroll_path)
|
||||
|
||||
d.swipe_ext("down", scale=0.85)
|
||||
await asyncio.sleep(0.3)
|
||||
|
||||
after_scroll_path = take_screenshot(d, f"aite_price_up_after_{i}", save_dir=TEMP_IMAGE_DIR)
|
||||
after_scroll_md5 = Kit.get_image_content_md5(after_scroll_path)
|
||||
|
||||
if os.path.exists(before_scroll_path): os.remove(before_scroll_path)
|
||||
if os.path.exists(after_scroll_path): os.remove(after_scroll_path)
|
||||
|
||||
if before_scroll_md5 == after_scroll_md5:
|
||||
logger.info(f"价格列表已到达顶部 (滚动次数: {i})")
|
||||
break
|
||||
|
||||
logger.info("正在从顶部开始向下逐页截图...")
|
||||
max_scroll_down_pages = 10
|
||||
for p_idx in range(1, max_scroll_down_pages + 1):
|
||||
p_shot = take_screenshot(d, f"price_scroll_{p_idx}_{station_name}", save_dir=TEMP_IMAGE_DIR)
|
||||
|
||||
before_dn_md5 = Kit.get_image_content_md5(p_shot)
|
||||
d.swipe_ext("up", scale=0.8)
|
||||
await asyncio.sleep(0.3)
|
||||
|
||||
check_dn_path = take_screenshot(d, f"check_dn_{p_idx}", save_dir=TEMP_IMAGE_DIR)
|
||||
after_dn_md5 = Kit.get_image_content_md5(check_dn_path)
|
||||
if os.path.exists(check_dn_path): os.remove(check_dn_path)
|
||||
|
||||
price_screenshots.append(p_shot)
|
||||
|
||||
if before_dn_md5 == after_dn_md5:
|
||||
logger.info(f"价格列表已到达底部 (共抓取页数: {p_idx})")
|
||||
break
|
||||
|
||||
# 后台处理价格图片
|
||||
logger.info(f"已启动后台分析价格页: {station_name},共 {len(price_screenshots)} 张图")
|
||||
task_price = asyncio.create_task(analyze_prices_background(service, station_name, price_screenshots))
|
||||
background_tasks.append(task_price)
|
||||
|
||||
# 立即返回
|
||||
d.press("back")
|
||||
await asyncio.sleep(0.5)
|
||||
|
||||
# 检查返回后的页面状态
|
||||
check_back_path = take_screenshot(d, f"check_back_{detail_uuid}", save_dir=TEMP_IMAGE_DIR)
|
||||
|
||||
check_list_md5 = Kit.get_image_content_md5(
|
||||
check_back_path,
|
||||
top_ratio=SAFE_EXCLUDE_RATIO,
|
||||
bottom_ratio=BOTTOM_SAFE_EXCLUDE_RATIO
|
||||
)
|
||||
check_detail_md5 = Kit.get_image_content_md5(check_back_path)
|
||||
|
||||
if os.path.exists(check_back_path): os.remove(check_back_path)
|
||||
|
||||
if check_list_md5 == current_md5:
|
||||
logger.info("检测到已直接返回列表页,跳过后续返回操作。")
|
||||
should_back_to_list = False
|
||||
elif check_detail_md5 == before_click_md5:
|
||||
logger.info("检测到返回详情页,需执行第二次返回。")
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"处理三级页面详情异常 ({station_name}): {e}")
|
||||
|
||||
# 从二级页面返回列表页
|
||||
if should_back_to_list:
|
||||
d.press("back")
|
||||
await asyncio.sleep(0.8)
|
||||
|
||||
# 记录 Redis
|
||||
full_name_key = f"crawled:aite:{Kit.clean_station_name(station_name)}"
|
||||
await redis_kit.set_data(full_name_key, "1", expire=REDIS_STATION_EXPIRE)
|
||||
|
||||
if FIRST_RUN_ONLY_ONE_STATION:
|
||||
logger.info("已完成首个场站的全流程采集,根据配置退出艾特吉易充爬取任务。")
|
||||
break
|
||||
|
||||
# 如果内层循环已达上限,外层循环也应退出,避免不必要的滑动
|
||||
if total_encountered_count >= max_stations_count:
|
||||
break
|
||||
|
||||
@@ -334,12 +337,9 @@ async def get_station_list(d, service, max_stations_count=MAX_STATIONS_COUNT):
|
||||
logger.error(f"后台任务异常: {t.exception()}")
|
||||
background_tasks.remove(t)
|
||||
|
||||
if not stations:
|
||||
if new_stations_processed_in_page == 0:
|
||||
no_new_data_count += 1
|
||||
logger.info(f"本页未识别到任何有效场站,连续 {no_new_data_count} 页无有效场站/新数据。")
|
||||
elif new_stations_processed_in_page == 0:
|
||||
no_new_data_count += 1
|
||||
logger.info(f"本页所有场站均已处理过,连续 {no_new_data_count} 页无新数据。")
|
||||
logger.info(f"本页所有场站均已处理过或被过滤,连续 {no_new_data_count} 页无新数据。")
|
||||
else:
|
||||
no_new_data_count = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user