Giter Club home page Giter Club logo

cug_emptyclassroom's Introduction

地大空教室爬虫

配置

爬虫主体 EmptyClassroomSpider 位于 Spider , 配置文件 Config.ini 位于 Config 包。 已经给出 Config.ini.example,根据需要补全字段后更名为 Config.ini 即可使用

account 含登录数字地大账号username,密码password

week 含开始抓取周start,结束周end,起始周与结束周可以相同,

startend 不是必须的,如果没有startend字段爬虫会爬取当前周的数据:

# 没有 start 与 end 字段
[week]

db 含主机地址host,账号username,密码password,数据库database

依赖管理

使用 pipenv 作为包管理。安装方法:

pip install pipenv

创建虚拟环境同时安装依赖:

pipenv install

运行结果

爬取所得数据位于 empty_classroom 表中:

date:日期。如 "2019-04-06"
week:周。
day:星期。星期一为 0,星期二为 1......
session:空闲时间。如"1,2"(注意无空格), "白天"
data:空教室信息
update_at:更新时间

完成配置后,执行:

python main.py

等待一段时间后控制台显示 Succeed 则成功,否则查看 log 获取帮助

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.