explaingit

urinx/weixinbot

7,380PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

A Python library that automates a WeChat account through its browser interface, letting you send and receive messages, set up auto-replies, and handle contacts from code, after scanning a QR code to log in.

Mindmap

mindmap
  root((repo))
    What it does
      WeChat bot framework
      Auto-reply messages
    How it works
      QR code login
      Phone authorization
      Message sync loop
    Message types
      Text messages
      Contact cards
      Shared links
      Location pins
    Tech stack
      Python 2 and 3
      pip install
    API reference
      Login endpoints
      Contact list
      Send messages
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build an auto-reply bot for a WeChat account that responds to incoming text messages and group chat messages automatically.

USE CASE 2

Send WeChat messages from a Python script to automate notifications or alerts.

USE CASE 3

Use the documented API reference to understand WeChat's internal web endpoints for login, contact sync, and message sending.

Tech stack

Python

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Python 2.7 or 3.6 and an active WeChat account, the web API it relies on can change without notice and the project is no longer actively maintained.

No license information was mentioned in the explanation.

In plain English

WeixinBot is a Python project that wraps the web version of WeChat, the Chinese messaging platform, and turns it into a programmable bot framework. WeChat has a browser-based interface that the project reverse-engineered to understand the underlying API calls, and this library automates those calls so you can control a WeChat account from Python code. The flow works like this: the program generates a QR code, you scan it with the WeChat app on your phone to authorize the session, and the bot then logs in and can send and receive messages on your behalf. An auto-reply mode can be enabled so that incoming text messages, including messages from group chats, receive automatic responses. The library also handles other message types that WeChat supports: contact cards, shared links, animated stickers, and location pins. The README is written in Chinese and includes detailed documentation of the WeChat web API endpoints that the project discovered through inspection. This covers the login sequence (getting a UUID, displaying the QR code, polling for scan confirmation), session initialization, fetching the contact list, message synchronization, and sending various message types. Each endpoint entry lists the URL, HTTP method, required parameters, and the structure of the response. This makes the repository useful both as a working bot and as a reference for the internal API. The project targets Python 2.7 and Python 3.6. Dependencies are installed via pip. The README notes that screenshots and documented features may not reflect the latest code, and directs readers to check the source directly for the current state. Note that WeChat's terms of service do not permit automated access of this kind, so this project operates in a legally grey area and the underlying web API it relies on is subject to change without notice. The repository has not received recent updates.

Copy-paste prompts

Prompt 1
Using the urinx/weixinbot library in Python, show me how to display a QR code login, wait for phone scan, and then enable auto-reply for all incoming messages.
Prompt 2
How do I use weixinbot to send a text message to a specific WeChat contact by name from a Python script?
Prompt 3
Walk me through weixinbot's WeChat web login sequence, QR code generation, polling for scan confirmation, and session initialization, so I understand what each API call does.
Open on GitHub → Explain another repo

← urinx on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.