Giter Club home page Giter Club logo

guahaoapp's Introduction

GuahaoApp

模拟登录挂号app(www.guahao.com), 实现预约挂号,登录,绕过验证码,后台监听不可预约的挂号状态转换成可预约状态时自动挂号

首先说明下 因为这个app的网络请求是要特殊处理的,所以我并没有使用什么其它的第三方框架而且这是我第一次使用mvp的开发模式,并不算很熟悉,所以代码会很乱很乱。。

当时遇到的问题:

  1. 登录的时候找不到保持持续登录的session 解决: 用chrome到网站去一个一个地去删除cookie 删除那个session(cookie)后要求重新登录的那个就是 保持持续登录的cookie; (ci i 就是这两个cookie保持持续登录,其它为存贮用户数据,发送http请求的时候把cookie写入头发送即可)

2.找到保持持续登录的cookie后 在本地模拟登录的时候获取不了相应的cookie 解决: 后来发现登录成功后的http状态码是304被重定向了(也是因为这个粗心没有发现导致多了半天的工作量),后来设置 HttpURLConnection.setInstanceFollowRedirects(false) 就获取到重定向前的cookie

3.爬取网页数据 解决 :jsoup 方便快捷。。。可写入cookie 可爬取数据(因为是临时写的,并没有去保证网页改变后是否还能获取相应的数据, 而这个 项目因为乙方违约的原因我们并不会继续去维护,所以才会公开代码)

4.想到了再写

感谢 黄则鸣 (扣取网页接口,撰写接口文件,还有请吃的一顿黄焖鸡) 吴京京 (后台的跳过验证码,虽然我还没去研究到底是怎么跳过的。。。正确率有80% 还不错) 冯浩 等itca团队成员

guahaoapp's People

Contributors

dunwen avatar

Watchers

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