weibo-crawler errors (Expecting value, 0 posts, incomplete data, query_list, no comments): how do I fix them?
Most weibo-crawler failures come from either m.weibo.cn blocking the session (Expecting value: line 1 column 1, 432 Client Error, or KeyError: 'ok' when HTML returns instead of JSON) or config/API limits (since_date auto-updating on txt-file runs so it finishes with 0 posts, query_list capped at 3 pages / 50 posts by m.weibo.cn, or missing download_comment: 1 + matching write_mode). For cookie-free, full-history reads without m.weibo.cn limits, XTikAPI's Weibo endpoints start at $0.002 a page.
Updated 2026-11-25
Match your symptom to the cause
Expecting value: line 1 column 1 / KeyError: 'ok' / 432 Client Error
Cause in GitHub issues: m.weibo.cn returned HTML login/verify page instead of JSON; cookie expired or IP/session rate-limited (issues #653, #593, #367)
Fix inside weibo-crawler: Log out and re-login at m.weibo.cn for a fresh cookie, raise pause intervals, switch IP, or try weiboSpider
Finished with "共爬取0条微博"
Cause in GitHub issues: since_date auto-updated after a prior txt-file run, start_page exceeded matching pages, or old code date format bug (issues #542, #215)
Fix inside weibo-crawler: Reset since_date to an older date, set start_page to 1, update to latest source
Incomplete posts (e.g., 5 days instead of 1 month)
Cause in GitHub issues: Stricter limits on official/government accounts, missing cookie, or hitting since_date (issues #274, #392)
Fix inside weibo-crawler: Add a valid cookie, increase stop pauses, wait and retry if 'utf-8' codec can't decode appears
query_list returns only 3 pages or 10–50 posts
Cause in GitHub issues: m.weibo.cn's in-account search itself truncates results (issues #335, #609)
Fix inside weibo-crawler: Remove query_list, crawl all posts and filter locally
Posts saved, 0 comments downloaded
Cause in GitHub issues: Missing config flags; comment module is community-contributed and unmaintained (issue #641)
Fix inside weibo-crawler: Set "download_comment": 1 and include a comment-capable write_mode (e.g. csv, markdown)
Reading Weibo posts, search, and comments without cookies
- User timeline:
weibo.posts.listwith userid,cursor(orsince_id) for paging, andfeatureto filter original posts; full long posts viaweibo.posts.detail(status_id). - Keyword search (without
query_list's 3-page truncation):weibo.posts.search(keyword,search_type,cursor) orweibo.posts.realtimefor newest-first. - Comments & replies:
weibo.comments.list(status_id,max_id,sort) andweibo.comment_replies.list(commentid). - Profile & reposts:
weibo.accounts.detailandweibo.posts.reposts.
Cost check: 50 accounts × 20 pages = 1,000 calls × $0.002 = $2; 100 posts × 5 comment pages = 500 calls = $1.
Why XTikAPI
- XTikAPI reads Weibo with 12 endpoints from $0.002 a call, and a failed call is not charged.
- Fewer tokens for AI: across 12 recorded live Weibo calls (2026-11-18), raw platform JSON is ~412k tokens vs ~18k via XTikAPI REST (95.6% fewer) and ~20k via MCP (95.3% fewer).
- See before you pay: 192 of 229 endpoints show a recorded real response on their page (12 of 12 for Weibo).
- Spending you control: a failed call or a timeout is not charged (charged: false), X-Max-Price caps one call, and the same Idempotency-Key within 24 hours is never billed twice.
- Free trial: a verified account gets $0.50, no card.
Endpoints
Each with its price; the endpoint page has parameters, fields and a recorded response.
- Weibo post list API$0.002 a callA Weibo account's posts, newest first.
- Weibo post details API$0.002 a callOne Weibo post by ID.
- Weibo post search API$0.002 a callOne page of Weibo posts for a keyword, as shown in the comprehensive search tab.
- Weibo realtime search API$0.002 a callWeibo realtime search: the newest posts for a keyword.
- Weibo comments API$0.002 a callA page of comments on one Weibo post.
- Weibo comment replies API$0.002 a callReplies under one Weibo comment.
- Weibo account details API$0.002 a callA Weibo account profile.
- Weibo reposts API$0.002 a callReposts of a Weibo post.
How to do it
Sources
What this page says about other products comes from their own pages and docs, read on 2026-11-25.
- weibo-crawler issue #653 (Expecting value after first page)
- weibo-crawler issue #593 (432 without cookie, Expecting value with cookie)
- weibo-crawler issue #542 (0 posts with valid cookie)
- weibo-crawler issue #609 (query_list only 10 posts)
- weibo-crawler issue #641 (comment download broken)
- weibo-crawler issue #274 (incomplete data)
More about Weibo
Questions
Is `Expecting value` the same as HTTP 432?
Both stem from Weibo rejecting the session: 432 happens without a valid cookie, while `Expecting value` happens when Weibo serves an HTML login/verification page instead of JSON.
Can raising `page_weibo_count` fix `query_list` returning too few posts?
Only partially: in issue #609 raising it from 10 to 100 increased results from 10 to 50, because m.weibo.cn itself truncates in-account search.
One key. Start now.
19 platforms, 229 endpoints, from $0.002 a call. Errors and timeouts are free.
Start free