Overview of Weibo Application Interfaces
mainThe Weibo application provides several layers of interfaces for interacting with Weibo data:
- Handler Interfaces: High-level methods for downloading single or user-specific Weibo content (
handle_one_weibo,handle_user_weibo). - Data Method Interfaces: Core logic for user management and data retrieval (e.g.,
fetch_user_info,fetch_user_weibo). - Utils Interfaces: Utility classes for configuration, cookie generation, and ID/nickname extraction (e.g.,
ClientConfManager,WeiboIdFetcher). - Crawler Interfaces: Low-level URL-based crawling via
WeiboCrawler. - Downloader Interfaces: Media and text downloading via
WeiboDownloader.
Key Implementation Notes:
- Pagination: Pagination parameters are included in the previous request's data and can be accessed via the built-in
filter. - Async Iteration: All interfaces involving pagination use asynchronous generators. Use
async forto iterate through results and automatically handle pagination. - Max Counts: If
max_countsis set toNoneor omitted, all available Weibo data will be retrieved. - Authentication: Using logged-in
cookievalues allows bypassing certain privacy settings.