Renren (人人) 是目前规模最大的校园社交网络 它是学生主要的校园信息发布与获取的渠道。在移动互联的时代,每个人不仅是浏览者更是互联网内容的贡献者,每天上亿的信息与内容在互联网上传播与发布。
数据源:人人或者微博上发布的新鲜事
技术:网络爬虫或网站API
数据库:MySQL
技术:MySQL数据库设计与管理
自然语言处理(分词)、 词频统计、 用户档案分析
通过网页的方式将分析结果简明的呈现出来,采用饼状图、柱状图等
为了分析登陆人人网所需发送的Http请求具体消息头,使用网络监视器软件监视Http请求。
分析出登陆人人网的http请求的方法是POST方法,请求的消息正文的表单域与对应参数也都可以看到。
CrawlSearchedStatus.java 爬取状态关键字搜索出来的用户的资料并访问其个人主页获取就读信息与居住地信息
RenrenSpider.java 人人httpclient爬虫:模拟登陆,爬取页面的源代码数据
dbhelper.java 操作MySQL数据库的相关处理,连接查插改删等方法
RenrenStats.java 数据分析与挖掘等统计操作-Statistic methods to analyze data
/**txt file path of Renren account username and password to log-in*/ String accountsFilePath = "D:/Renren/account.txt"; /**the start page number of crawling target */ int offset = 9420; /**keyword of timeline statuses to crawl in English*/ String tableName = "party"; /**keyword of timeline statuses to crawl in Chinese*/ String keyword = "聚会"; /**the start proxy host to use*/ int proxyIndex=9; /**if need proxy host to crawl at beginning*/ boolean needProxy = false; /**pause time (in seconds) after every crawl*/ double sleepSec = 0.5;