Giter Site home page Giter Site logo

bj-hospital-registration's Introduction

北京医院自动挂号脚本

最近想挂某医院的专家号,在www.bjguahao.gov.cn每日七点放号。手工挂号流程是, 登录=》选医院=》选科室=》选日期(上下午)=》选医生=》下发短信=》填写表单提交。 试了几天人工,发现手工操作太慢一两个专家号一闪就没。顾打算使用nodejs来写个自动登录选医院,同时多科室(特需)看空闲医生。触发短信。 人工填写短信。自动提交表单。

使用方法

  1. 安装nodejs环境
  2. 克隆本仓库回去 npm install 安装依赖包
  3. 个性 config.js 配置文件
  4. 启动脚本 node index.js

文件目录结构

+-- config.js //配置文件 
+-- index.js //主程序文件
+-- package.json //nodejs项目文件 
+-- README.md //本文件

讲一下脚本的流程。

  1. 登录,其中用户名和密码要做一次base64编码
  2. 保存服务器下发的cookie ,之后每个操作都要带着提交
  3. 验证登录状态。
  4. 使用setTimeout开始循环调用指定日期的医生列表接口。
  5. 放号后,遍历每一位医生,当发现医生还有号并为配置文件中想挂号等级的医生。准备发送短信
  6. 控制台等待用户输入手机验证码。输入完毕后自动 提交表单。
  7. 不管成功与否,程序会自动继续检查下一位候选医生。
  8. 结束程序请使用Ctrl+c

还没有自动化的一些关键URL

//医院列表
http://www.bjguahao.gov.cn/hp/qsearch.htm?areaId=-1&levelId=-1&isAjax=true

//科室
http://www.bjguahao.gov.cn/dpt/dpts.htm?hospitalId=142&hospitalType=1&isAjax=true

bj-hospital-registration's People

Stargazers

kkstar avatar Janene avatar  avatar Smile avatar Orange avatar albon arith avatar Jay Su avatar

Watchers

James Cloos avatar Hai avatar  avatar Jay Su avatar

bj-hospital-registration's Issues

Todo lists

请问 未完成的2个还会继续做完吗?

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.