Use Python to search Weibo and turn selected comments into product questions
The weibo_read.py script below saves one page of Weibo search results with weibo.web_v2.fetch_realtime_search; you then select the posts about actual product use and fetch the comments of each selected post ID with weibo.web_v2.fetch_post_comments. With a verified post ID, start directly at the comments. Hand off a table with the question, the exact quote, the usage conditions and the original post.
For example, for camping-lantern research, search for cold-weather battery life and look for reports about temperature, brightness and runtime. weibo_read.py uses only the Python 3 standard library and saves one request and the request’s full response per run.
1. Plan this round
Set BEATAPI_API_KEY in your local environment. weibo_read.py reads the key from the environment and does not save authentication headers. Plan one search page, select two or three posts manually, and read one comment page for each selected post.
One search plus three comment pages is four data requests, each charged at the action’s current price on the pricing page. Fetch post details only when a post needs the full text. The requested count is not the number of comments actually returned.
2. Save an original response with Python
Save the script as weibo_read.py. The search mode calls weibo.web_v2.fetch_realtime_search; the comments mode calls weibo.web_v2.fetch_post_comments. Give each run a new output directory.
Retrieve one search page:
Each output directory holds the request, the attempt time, the call record (call.json) and the original response (response.json). weibo_read.py checks the public execution envelope only; you still read the Weibo content yourself, which call.json records as platform_review: required. The script saves every HTTP response. On a network interruption, the script records the attempt and exits; the script never retries automatically and never overwrites an existing directory.
3. Select genuinely relevant posts
- Check each result. Read the returned posts and verify the product, the situation and the author.
- Prioritize useful posts. Prefer posts with real experience, concrete questions or a discussion worth expanding.
- Exclude noise. Exclude unrelated namesakes and campaign reposts, and record the reason for each exclusion.
Keep each verified post ID as the original string, with the source, the selection reason, the text and the returned time information. weibo.web_v2.fetch_realtime_search and weibo.web_v2.fetch_post_comments have no recorded fixed list keys, so do not assume another service’s data.items, metrics.comments or page.next_cursor. Save the material first, then identify the posts from the actual result.
A manual selection table can contain:
When a long post’s text is incomplete, fetch the selected post’s detail with the text and identifier steps; do not treat an excerpt as the full text.
4. Read selected comments
Run the comments mode with the verified post ID and a new directory:
Save each selected post’s comments in a separate directory. In weibo.web_v2.fetch_post_comments, id is the post ID and the first max_id is empty; for the next page, use the continuation value the response actually returned. weibo_read.py fetches one first batch only: the script does not select posts, paginate or collect all replies automatically.
For an ambiguous comment such as “how long does it last?” or a model correction, follow the comment research FAQ to add the parent context. A reply request takes the top-level comment ID, not the post ID.
5. Turn material into useful questions
In the manual worksheet, keep the topic, the exact excerpt, the post and comment source, the parent relationship, the conditions, the interpretation, the open questions and the next step. Count supporting comments and distinct posts separately, and keep the relationships among replies in one discussion.
For example, route cold-weather high-brightness runtime questions to testing and documentation. Separate discussions with a corrected model reference before interpreting them. Exclude giveaway entries from usage themes. Every conclusion must lead back to saved material.
The workflow delivers the original search and comment responses plus a manually reviewed question table. Automatic top-ten selection by comment count and a fixed-field CSV export both need a confirmed output structure first, so this guide includes no batch parser built on guessed fields.
Prompt for an assistant with the BeatAPI tools configured:
Reuse these Python-saved searches and comments for actual camping-light usage. Attach wording, conditions and sources to each question, indicating reply context still needed. Identify material for instructions and testing, and state actual reading scope.
Process the existing questions before planning another collection round. Configure recurring runs, storage and notifications in your own task environment.

