Giter Club home page Giter Club logo

bit_srun_login_selenium's Introduction

基于Selenium的BIT-Web登录脚本

最近有这么个需求,用了几位大佬基于的urlib和request的脚本都出现了假登录的现象,于是乎就基于Selenium写了个脚本实现了一下。

1. Selenium与chromedriver安装

可以参考以下链接进行安装与配置 参考链接

2. 基本逻辑

  1. 间隔10s进行数次ping,若ping不通说明网络已断开,执行login_func子函数。
  2. login_func中调用selenium.webdriver获取校园网登录网页信息。
  3. 通过find_element_by_id找到用户名与密码输入框,利用send_keys输入并登陆。

bit_srun_login_selenium's People

Contributors

mmdawn avatar

Stargazers

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