Skip to content

Henryhaohao/Xiecheng_Comment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

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

Author 😎Henryhaohao😎
Email ♥️1073064953@qq.com♥️

🐬声明

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

🐬介绍

该项目为多线程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呗,也算是对我学习路上的一种鼓励!
哈哈哈,感谢大家!笔芯~
💘💘

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages