Coder Social home page Coder Social logo

python_weibospider's Introduction

python_weiboSpider

本项目关于微博数据爬取/文本分析/词云展示 文本分析主要用到了LDA主题模型

代码运行说明

1.weibopr.py是用来分析大V博主影响力的,同时会爬取博主微博数据保存在weibopr这个文件夹下。

2.userid.py是用来爬取博主粉丝uid的,保存在Weibo_list_p.txt和Weibo_list_jy.txt两个文档下。

3.wb_spider.py是根据粉丝uid来爬取粉丝微博的,爬取数据分别保存在weibo_p和weibo_jy两个文件夹下,这个耗时特别久,所以我又准备了一个简易的测试代码(没在图里显示出来),名称为wb_spider_test.py ,可以爬取10条井越的粉丝微博保存在weibo_test文件夹下。

4.LDA.py是利用LDA主题模型进行文本分析的,输出为top_words.txt和top_words2.txt两个文档,前者为彭姐的,后者为井越的。

5.cloud.py是用来生成词云图的,词云形状是根据文件夹内的背景图片。

很重要!!!说明:涉及爬取数据的代码需要本人cookie,代码中有备注提醒,不然会爬取失败。同时,在运行wb_spider.py的时候,因为爬取数据太多了,所以有可能会出现报错,只要等一会再继续运行就可以了。

python_weibospider's People

Contributors

heidimars avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

python_weibospider's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.