|
|
@@ -77,6 +77,7 @@ async def search_posts(
|
|
|
channel: str = "xhs",
|
|
|
cursor: str = "0",
|
|
|
max_count: int = 5,
|
|
|
+ content_type: str = ""
|
|
|
) -> ToolResult:
|
|
|
"""
|
|
|
帖子搜索
|
|
|
@@ -97,6 +98,7 @@ async def search_posts(
|
|
|
- weibo: 微博
|
|
|
cursor: 分页游标,默认为 "0"(第一页)
|
|
|
max_count: 返回的最大条数,默认为 5
|
|
|
+ content_type:内容类型-视频/图文,默认不传为不限制类型
|
|
|
|
|
|
Returns:
|
|
|
ToolResult 包含搜索结果:
|
|
|
@@ -129,6 +131,7 @@ async def search_posts(
|
|
|
"keyword": keyword,
|
|
|
"cursor": cursor,
|
|
|
"max_count": max_count,
|
|
|
+ "content_type": content_type
|
|
|
}
|
|
|
|
|
|
async with httpx.AsyncClient(timeout=DEFAULT_TIMEOUT) as client:
|