Skip to main content

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()

Release files for hitutil-en 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for hitutil-en 0.1.2
File Interpreter ABI Platform
hitutil_en-0.1.2-py3-none-any.whl Python 3 none any Details

Release files / hitutil_en-0.1.2-py3-none-any.whl

Download URL hitutil_en-0.1.2-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a13c9e8cbdd1b46cd00f49eaaa8debebca5dd539282c371845a9948bb394e3cd
BLAKE2b-256 checksum
How to use checksums
beabf4ccb2895eb245cb8a6ecd94e2f730402927e3ac6668d3fc6254d22f64f5
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page