This commit is contained in:
kgod
2026-05-26 21:02:17 +08:00
commit 8697477a53
10000 changed files with 1541403 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
"""状态定义"""
from typing import TypedDict
from playwright.async_api import Page
class NextPageState(TypedDict, total=False):
"""下一页选择器分析状态"""
# 输入
url: str
page: Page
# 节点1: fetch_page
html: str
# 节点2: find_pagination_area
pagination_selector: str
pagination_html: str
has_pagination: int # 0=无分页, 1=有分页
# 节点3: find_next_button
selector: str
# 节点4: validate_next
change_type: str # url_change / content_change / new_tab / no_change
is_valid: bool
# 重试
failed_selectors: list[str]
retry_count: int
# 错误
error: str