网络爬虫是一个非常注重实践性而且实用性很强的编程技能,它不是程序员的专属技能,任何具有一定编程基础的人都可以学习爬虫,写爬虫分析股票走势,上链家爬房源分析房价趋势,爬知乎、爬豆瓣、爬新浪微博、爬影评,等等。人工智能时代,对数据的依赖越来越重要,数据主要的来源就是通过爬虫获取,通过爬取获取数据可以进行市场调研和数据分析,作为机器学习和数据挖掘的原始数据。
本文基于 Python 对微信好友进行数据分析,这里选择的维度主要有:性别、头像、签名、位置,主要采用图表和词云两种形式来呈现结果。同平时登录网页版微信一样,我们使用手机扫描二维码就可以登录,这里返回的friends对象是一个集合,第一个元素是当前用户。
关键词:网络爬虫;Python;朋友圈
Abstract
Web crawler is a very practical and practical programming skills, it is not the exclusive skills of programmers, anyone with a certain programming base can learn crawler, write crawler analysis stock trends, Lianjia crawled house price trends, crawling know, climb pea petal, Sina climber Weibo, climbing film review, and so on. In the era of artificial intelligence, the dependence on data is becoming more and more important. The main source of data is crawler acquisition, which can be used for market research and data analysis as the original data for machine learning and data mining.
This paper analyzes the data of WeChat friends based on Python. The main dimensions selected here are: gender, image, signature, location, mainly using two forms of chart and word cloud to present the results. Like WeChat, we use our mobile phone to scan the QR code. The friends object returned here is a collection, and the first element is the current user.
Keywords: Web crawler Python; circle of friends
目录