【Related learning recommendations: python tutorial】
Download address: https://wkhtmltopdf.org/downloads.html
I used windows for testing. After downloading and installing, the results are as follows
You cannot directly use wkhtmltopdf to export WeChat public account articles. The exported articles will lack pictures, so you need to use wechatsogou to crawl the WeChat public account article page, and then convert the html Convert text to pdf
pip install wechatsogou --upgrade
pip install pdfkit
Step on the trap! ! ! After reading a lot of people's codes, they are all a template. Everyone copied them over and over again, but it still doesn't work. It may be because the dependency package has been updated, or it may be because I have not configured the environment variables of wkhtmltopdf locally
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
Related learning recommendations: WeChat Mini Program Tutorial
The above is the detailed content of How to export WeChat public account articles in python. For more information, please follow other related articles on the PHP Chinese website!