The reference tutorial in this article comes from the WeChat public account [Alfred in New Zealand]. The article is as follows:
" An Interesting Thing: Climbing My Wechat Friends " (click to read the original text to view)
According to the original author's ideas and code, crawl his own WeChat friend information and make a word cloud map of friends' signatures. In this practice, we mainly use itchat, jieba, wordcloud and other packages. The original author uses R for chart visualization, which I will briefly do here. Improved, using the pyecharts package.
About the itchat package, Chinese documentation:
1、https://itchat.readthedocs.io/zh/latest/
2 、 http: //www.cnblogs.com/yanjingnan/p/6831464.html
Github address:
https://github.com/littlecodersh/ItChat/tree/robot
About the pyecharts package:
https://github.com/chenjiandongx/pyecharts
The practice process is as follows:
1. Install the itchat package, log in to WeChat, and crawl information related to WeChat friends.
Install the itchat package: pip install itchat
Crawl WeChat friends related information:
2. The ratio of men and women who get their WeChat friends
3. Install the pyecharts package and draw a gender ratio distribution map
4. Define a function to climb down friends' nicknames, provinces, cities, genders, signatures and other data and save them to the data frame
5. Read the data file and view the distribution of your friend's province
(Due to privacy concerns, the read data results are not shown)
6. Custom word cloud map of WeChat friends' personal signatures
This program is completed through python3, and the encoding problem is not solved in python2. To be continued research.