Giter Club home page Giter Club logo

ahau_jwxt's Introduction

安徽农业大学/安农大教务系统成绩查询

Author: SimonHu

Build with python3.5 CodeFactor


介绍/Introduction:


写成时间于一年前,原来的正方系统只需要requests就可以爬取到数据,新版则需要采用【Splinter,Selenium,Pyppeteer】先渲染拿到cookies(可以用headless模式),然后构造正确的headers,随后就可以用requests访问了。在获取到数据后使用pandas处理,再使用PrettyTable让数据更加好看。如果你是想尝试便捷查成绩或者学习爬虫的安农学弟学妹,可以试一试,有问题在issues里提出来。现在该爬虫是否可行我已无从知晓了,因为↓

image-20200523001306681

(My AHAU story is over 😏)

需求/Requirements:


#python lib

prettytable==0.7.2
requests==2.22.0
splinter==0.7.7
pandas==0.23.4
beautifulsoup4==4.9.1

$ pip install ...

使用/Usage:


1.如果你的Lib没有装齐,就首先 pip install -r requirements.txt
2.打开ahau.py,自行编辑参数

#line 22-29
post_data = {
    'xnm': '2017',  # 2017就代表2017-2018学年,e.g 2016就是代表2016-2017
    'xqm': '12',  # 3为XX学年第一学期,12为XX学年第二学期
    'nd': '1533559378012',
    'queryModel.showCount': '45',
    'queryModel.currentPage': '1',
    'queryModel.sortOrder': 'asc',
    'time': '1'
}

# line 36-37
username = 'xxx'  #自己的用户名
password = 'xxx'  #自己的密码

# 启动sangforVPN,建议你自己手动开启,自动开启的代码被我注释了,代码如下
# line 52-54
    # 先启动VPN,这一步可有可无,可以手动开启。
    # result=os.popen(r'C:\Program Files (x86)\Sangfor\SSL\SangforCSClient\SangforCSClient.exe')
    # time.sleep(10)
    
3. $ python ahau.py

生成内容/Output Content:


印象中输出效果还可以,挺适合终端浏览的,但是现在我↓

image-20200523001306681

ahau_jwxt's People

Contributors

simonhu-hn avatar

Stargazers

林卓睿 avatar Shell avatar

Watchers

James Cloos avatar  avatar

ahau_jwxt's Issues

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.