Coder Social home page Coder Social logo

albertwy / commentbox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dongweiming/commentbox

0.0 1.0 0.0 3.68 MB

网易云音乐精彩评论

Home Page: http://music.python-cn.org/

Python 38.75% Makefile 0.26% HTML 1.28% JavaScript 51.60% CSS 8.12%

commentbox's Introduction

Commentbox

一个抓取网易云音乐精彩评论的爬虫

爬虫实现可见Python之美。请访问云音乐评论看真实效果。

预览,Web端:

移动端效果:

使用技术

  1. 后端: Flask + Mongoengine + Mako + requests + Redis + lxml + concurrent.futures

  2. 前端:React + Mobx + Fetch + Material-UI + ES6 + Webpack + Babel

Getting Started

虚拟环境和安装应用依赖

❯ git clone https://github.com/dongweiming/commentbox
❯ cd commentbox
❯ virtualenv venv
❯ source venv/bin/activate
❯ pip install -r requirements.txt
❯ cp local_settings.py.tmpl local_settings.py  # 然后修改其中的配置(如Redis,MongoDB)

爬虫篇

  1. 抓取之前可以添加一些代理地址到local_settings.py中,否则会影响爬取速度。
  2. 修改run.py中max_workers的数量,建议选择服务器CPU核数作为这个值。 然后启动python run.py就开始抓取了。

前端开发篇

先安装:

❯ cd assets
❯ npm install  # 推荐使用cnpm, 要不然有点慢

开发:

开发时可以先修改server.js里面的主机和端口号,然后启动

❯ make dev

目前默认后端使用8100端口,开发模式使用3000端口。

部署:

 ❯ make build

执行完毕就会在生成新的static/js/dist/index.bundle.js*文件了。

Enjoy it!

commentbox's People

Contributors

dongweiming avatar

Watchers

 avatar

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.