'commit'
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# 采集配置
|
||||
SCROLL_DISTANCE_RATIO = 0.3
|
||||
MAX_STATIONS_COUNT = 20
|
||||
MAX_STATIONS_COUNT = 50
|
||||
FIRST_RUN_ONLY_ONE_STATION = False
|
||||
REDIS_STATION_EXPIRE = 120
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ NON_STATION_KEYWORDS = [
|
||||
"充电券",
|
||||
"电信积分兑换",
|
||||
"确认",
|
||||
"广告",
|
||||
"距离/区域",
|
||||
"综合排序",
|
||||
"偏好",
|
||||
@@ -47,6 +46,7 @@ NON_STATION_KEYWORDS = [
|
||||
"输入",
|
||||
"商城",
|
||||
"推荐",
|
||||
"新客专享",
|
||||
]
|
||||
|
||||
def _load_image(path):
|
||||
@@ -140,11 +140,17 @@ async def run_ocr_rect(image_path, log_path=None):
|
||||
status = "drop"
|
||||
reasons.append("bottom_safe_zone")
|
||||
if status == "keep" and txt:
|
||||
for kw in NON_STATION_KEYWORDS:
|
||||
if kw and kw in txt:
|
||||
status = "drop"
|
||||
reasons.append("non_station_keyword")
|
||||
break
|
||||
# Prevent filter bar items from being treated as stations
|
||||
if txt.strip() in ["充电站", "快充", "慢充", "超快充", "广告"]:
|
||||
status = "drop"
|
||||
reasons.append("exact_filter_keyword")
|
||||
|
||||
if status == "keep":
|
||||
for kw in NON_STATION_KEYWORDS:
|
||||
if kw and kw in txt:
|
||||
status = "drop"
|
||||
reasons.append("non_station_keyword")
|
||||
break
|
||||
|
||||
log_detail(
|
||||
f"OCR[{idx + 1}] text={repr(text)} prob={prob:.3f} "
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user