Coder Social home page Coder Social logo

readdaily's Introduction

readdaily

每日阅读

####执行方法

  • ① git clone 到本地
  • ② 查看 spider/settings.py文件中的数据库配置 以下是Sae的配置,线上无需修改。
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': sae.const.MYSQL_DB,                      # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': sae.const.MYSQL_USER,
        'PASSWORD':sae.const.MYSQL_PASS,
        'HOST': sae.const.MYSQL_HOST,                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        'PORT': sae.const.MYSQL_PORT,                      # Set to empty string for default.
    }
}
  • ③ 完成对数据库的配置后,利用命令 python manage.py syncdb 初始化数据表。不出意外的话,表名应该为article。
  • ④ 接着需要填充数据,查看spider/cron.py 和spider/urls.py应该能明白是通过url的方式 :keepData/id/ (id为int) 存储数据。

#####注意

  • SAE 上需要手动初始化数据表。
  • SAE 上能配置config.yaml来实现cronjob。

####技术与功能

  • 后端:python 2.7 django 1.5 lxml 3.4 beautifulsoup 3.2 MySQL
  • 前端:bootstrap 3 Jquery
  • 数据库定时更新
  • 移动端界面适配

readdaily's People

Contributors

henryluki 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.