Install
openclaw skills install zhihu-search-api-skillThis skill helps users automatically extract structured article details and full content from Zhihu via the BrowserAct API. Agent should proactively apply th...
openclaw skills install zhihu-search-api-skillThis skill uses BrowserAct's Zhihu Search API template to provide a one-stop article extraction service. It extracts structured article details and full content from Zhihu article search results based on keywords and publication date filters.
Before running, you need to check the BROWSERACT_API_KEY environment variable. If it is not set, do not take other actions; wait for the user to provide it.
The Agent must inform the user at this time:
"Since you have not configured the BrowserAct API Key yet, please go to the BrowserAct Console first to get your Key."
The Agent should flexibly configure the following parameters according to user needs when calling the script:
keyword (Search Keywords)
stringAI agent, openclawPublish_date (Publication Date Range)
string7d: Past 7 days30d: Past 30 days90d: Past 90 days1y: Past yearall: Any time7dDate_limit (Extraction Limit)
number10The Agent should execute the following independent script to achieve "one command gets results":
# Example call
python -u ./scripts/zhihu_search_api.py "keyword" "Publish_date" limit
Because this task involves automated browser operations, it may take a long time (several minutes). The script will continuously output status logs with timestamps (e.g., [14:30:05] Task Status: running) while running.
Agent Must Know:
Upon successful execution, the script will directly parse and print the result from the API response. The result includes:
title: Full article titlebody_content: Full body content of the articleimage_url: Main image URL or article cover image URLauthor: Article author or publishing account namepublication_date: Article publication dateurl_link: Original article URLDuring the execution of the script, if an error is encountered (such as network fluctuations or task failure), the Agent should follow this logic:
Check the output content:
"Invalid authorization", it means the API Key is invalid or expired. Do not retry at this time, and guide the user to check and provide the correct API Key."Invalid authorization" but the task execution fails (for example, the output starts with Error: or the return result is empty), the Agent should automatically try to execute the script once more.Retry limits: