Skip to main content

hit.edu.cn utils with magic modification

Project description

hitutil

hitutil 基于 requests,是一个与哈尔滨工业大学网络业务相关的支持库。

ids

统一身份认证相关服务

ids.idslogin() 模拟统一身份认证登陆, 返回一个已登陆的 requests.Session.

from hit import ids
session = ids.idslogin('USERNAME', 'PASSWORD')
session.get('http://jwes.hit.edu.cn/queryWsyyIndex') # 登陆本科生网上服务系统
response = session.get('http://jwes.hit.edu.cn/cjcx/queryQmcj') # 查询成绩

timetable

课表相关服务

from hit import timetable

def main():
    print(timetable.parse_to_df(timetable.query_by_gxh('学号', '学期', '''周次,整数'''))) # 学期类似:'2021-2022;1' 表示秋季学期

if __name__ == '__main__':
    main()

学期参数说明

接口参数 对应实际学期
2020-2021;1 2020秋季
2020-2021;2 2021春季
2020-2021;3 2021夏季
2020-2021;4 2021暑假
2020-2021;5 2021寒假
2021-2022;1 2021秋季
... ...

score

成绩查询服务

from hit import score
from hit import ids


def main():
    s = ids.idslogin('学号', 'ids密码')
    score.query(s).to_csv('我的成绩.csv') # 保存结果到csv


if __name__ == '__main__':
    main()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

hitutil_en-0.1.2-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file hitutil_en-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: hitutil_en-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for hitutil_en-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a13c9e8cbdd1b46cd00f49eaaa8debebca5dd539282c371845a9948bb394e3cd
MD5 d53961eac5892e4a24e3ab7f4798c3c9
BLAKE2b-256 beabf4ccb2895eb245cb8a6ecd94e2f730402927e3ac6668d3fc6254d22f64f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page