主要是通过R语言,对网页上的数据进行进行爬取,并且整理成文本格式,或者excel格式。
Sys.setlocale("LC_TIME","C")##[1]"C"-----------------------------------------------------------##Createafunction,theparameter'i'meanspagenumber.getdata%html_nodes("div.post_itemdiv.post_item_foot")%>%html_text()%>%strsplit(split="\r\n")#对日期数据的处理-------------------------------------------------------------post_date%str_sub(9,24)%>%as.POSIXlt()##getthedatepost_year%html_nodes("div.post_itemh3")%>%html_text()%>%as.character()%>%trim()
1