Giter Site home page Giter Site logo

henryhaohao / xiecheng_comment Goto Github PK

View Code? Open in Web Editor NEW
25.0 3.0 9.0 5.02 MB

:rainbow:Xiecheng_Comment多线程Threading爬取携程的丽江古城景点评论并生成词云

Home Page: http://you.ctrip.com/

Python 100.00%
xiecheng comment threading wordcloud python mongodb

xiecheng_comment's Introduction

多线程爬取携程的丽江古城景点评论并生成词云 enter image description here

携程官网 - http://you.ctrip.com/

Author 😎Henryhaohao😎
Email ♥️[email protected]♥️

🐬声明

软件均仅用于学习交流,请勿用于任何商业用途!感谢大家!

🐬介绍

该项目为多线程Threading爬取携程的丽江古城景点评论并生成词云

  • 项目介绍:通过爬取携程网中关于丽江古城景点的点评(共计3010条),并对这些评论进行中文分词(Jieba库)及预处理,最终生成一张关于“丽江古城”的词云图(Wordcloud词云库)
  • 爬虫文件:Spiders目录下的xiecheng_comment.py
  • 生成词云图文件:运行Spiders目录下的comment_wordcloud.py
  • 数据库配置文件:运行前修改Spiders目录下的config.py,其中为mongodb的相关配置

🐬运行环境

Version: Python3

🐬安装依赖库

pip3 install -r requirements.txt

🐬运行截图

  • 词云图

    enter image description here
  • 携程景点评论

    enter image description here
  • 爬取评论(3010条耗时1秒)

    enter image description here
  • 评论内容

    enter image description here
  • 评论数

    enter image description here

🐬总结

最后,如果你觉得这个项目不错或者对你有帮助,给个Star呗,也算是对我学习路上的一种鼓励!
哈哈哈,感谢大家!笔芯~
💘💘

xiecheng_comment's People

Contributors

henryhaohao avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

xiecheng_comment's Issues

景点评论条数问题

作者您好,请问如果我想要获取大于3010条的评论应该怎么修改呢,改了page后发现它还是只能爬到3010条。

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.