diff --git a/cmd_arg/arg.py b/cmd_arg/arg.py index 8e7c360..047e4f2 100644 --- a/cmd_arg/arg.py +++ b/cmd_arg/arg.py @@ -250,22 +250,14 @@ async def parse_cmd(argv: Optional[Sequence[str]] = None): rich_help_panel="Basic Configuration", ), ] = "", - max_comments_per_post: Annotated[ + max_comments_count_singlenotes: Annotated[ int, typer.Option( - "--max_comments_per_post", + "--max_comments_count_singlenotes", help="Maximum number of first-level comments to crawl per post/video", rich_help_panel="Comment Configuration", ), ] = config.CRAWLER_MAX_COMMENTS_COUNT_SINGLENOTES, - xhs_sort_type: Annotated[ - str, - typer.Option( - "--xhs_sort_type", - help="XiaoHongShu sort type (e.g., popularity_descending, time_descending)", - rich_help_panel="Platform Specific Configuration", - ), - ] = "", ) -> SimpleNamespace: """MediaCrawler 命令行入口""" @@ -290,11 +282,7 @@ async def parse_cmd(argv: Optional[Sequence[str]] = None): config.CDP_HEADLESS = enable_headless config.SAVE_DATA_OPTION = save_data_option.value config.COOKIES = cookies - config.CRAWLER_MAX_COMMENTS_COUNT_SINGLENOTES = max_comments_per_post - - # Set XiaoHongShu sort type if specified - if xhs_sort_type and platform == PlatformEnum.XHS: - config.SORT_TYPE = xhs_sort_type + config.CRAWLER_MAX_COMMENTS_COUNT_SINGLENOTES = max_comments_count_singlenotes # Set platform-specific ID lists for detail/creator mode if specified_id_list: