Crawl WeChat public account articles
Bilibili video demonstration: https://www.bilibili.com/video/BV1vN411D7Y3/
Note, unless you want to resume downloading from a breakpoint, delete conf.ini and url.json in the directory and start again! ! ! !
1. Download and unzip Chrome.rar ;
2. Download and unzip default.zip;
3. Put the decompressed Chrome into the decompressed default;
4. Enter the default directory and run main.exe ;
5. Fill in the information and click " Start ".
6. If you want to modify the UI, you can install this: Qt Designer
When writing articles using an official account, you can search for articles from other official accounts to achieve the purpose of crawling all articles from a specified official account.
Log in through selenium to obtain tokens and cookies, and then automatically crawl and download them.
Create a virtual environment
conda create -n wechat python=3.9 -y
Enter virtual environment
conda activate wechat
Install third-party libraries
pip install -r requirements.txt
For mac users, an error may be reported when installing pyqt5. You can try:
brew install pyqt@5 cp -r /opt/homebrew/Cellar/pyqt@5/5.15.7_2/lib/python3.9/site-packages/ * /Users/songxf/miniconda3/envs/wechat/lib/python3.9/site-packages/
Then you can import:
import PyQt5
run script
python main.py
Package exe (generated under dist)
pyinstaller -F -w -i icon.ico main.py
Welcome to follow the WeChat public account: xfxuezhang
If this project helps you, welcome to buy me a drink??