feat: 启动任务接口添加帖子/视频数量与评论数量覆盖支持

This commit is contained in:
钟保罗
2026-05-19 20:57:07 +08:00
parent f328ee35b5
commit ec432eb63e
4 changed files with 126 additions and 0 deletions

View File

@@ -275,6 +275,14 @@ async def parse_cmd(argv: Optional[Sequence[str]] = None):
rich_help_panel="Comment Configuration",
),
] = config.CRAWLER_MAX_COMMENTS_COUNT_SINGLENOTES,
crawler_max_notes_count: Annotated[
int,
typer.Option(
"--crawler_max_notes_count",
help="Maximum number of videos/posts to crawl",
rich_help_panel="Basic Configuration",
),
] = config.CRAWLER_MAX_NOTES_COUNT,
max_concurrency_num: Annotated[
int,
typer.Option(
@@ -342,6 +350,7 @@ async def parse_cmd(argv: Optional[Sequence[str]] = None):
config.SAVE_DATA_OPTION = save_data_option.value
config.COOKIES = cookies
config.CRAWLER_MAX_COMMENTS_COUNT_SINGLENOTES = max_comments_count_singlenotes
config.CRAWLER_MAX_NOTES_COUNT = crawler_max_notes_count
config.MAX_CONCURRENCY_NUM = max_concurrency_num
config.SAVE_DATA_PATH = save_data_path
config.ENABLE_IP_PROXY = enable_ip_proxy_value