WechatSogou is a Python library that provides a programmatic bridge to WeChat content by scraping Sogou's search engine results. It resolves WeChat account profile pages to article lists, filters trending articles by predefined categories, and manages browser-like cookie sessions to maintain authenticated access. The library parses raw HTML to extract article metadata, account details, and keyword suggestions, while dynamically adjusting request frequency to avoid IP blocking.
The project offers capabilities for searching WeChat public accounts and articles by keyword, returning profile details such as name, ID, and authentication status, along with article titles, abstracts, and URLs. It can fetch detailed account information including introductions, QR codes, and recent posting statistics, as well as retrieve the most recent articles from an account's history with metadata like title, cover image, and publish time. The library also generates related keyword suggestions to refine searches and retrieves trending articles from WeChat's homepage by category.
Additional functionality includes parsing trending articles from specified categories and extracting paginated article URLs from account profile pages. The library's documentation covers installation and usage for these data extraction tasks.