Giter VIP home page Giter VIP logo

ncku-web-crawl's Introduction

NCKU-Web-Crawl

Use python selenium to get the course

找到目標課程並查詢餘額

檢查選課人數是否額滿,如果額滿則用 while 卡著,直到有餘額進行下一步。

輸入帳號密碼並辨識驗證碼

原本想直接拿到圖片 src 再用 urllib 直接獲取圖片做驗證,但似乎有做另外的保護,使得想要 access 驗證碼圖片就會換成另一張驗證碼。 所以我就對畫面做截圖,裁切適當後,利用 pytesseract 做文字辨識,值得一提的是因為圖片有些 noise 可能會多辨識成 ' , . 等符號進去,要檢查每個char是否為 digit。

選課

由於選課時,server 忙碌造成擁塞,會讓 selenium 無法取得物件產生 exception ,需要做 try catch 的動作,讓網頁可以等到正常時再動作。 而且其選課的介面是包在另外一個 html 裡面所以必須要先 switch frame 到目標 html ,才能找到目標物件

ncku-web-crawl's People

Contributors

ndsl7109256 avatar

Stargazers

 avatar

Watchers

James Cloos 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.