Skip to main content

py_buaa_login

一个十分笨重的(基于 selenium)北航校园网自动化登录脚本。

安装方式

pip install py_buaa_login

使用方式

初次测试

在使用此脚本登录校园网前,脚本初次运行可能会从外网下载 ChromeDrive。因此建议在有外网的环境下进行初次运行测试,测试内容为:

python -m py_buaa_login test "https://www.google.com"

如果程序输出 Test successfully. 则说明 selenium 中的 ChromeDrive 可用。

登录校园网

# 从命令行参数获得用户名和口令
python -m py_buaa_login login "<username>" "<password>"

# 从标准输入或者文件获取用户名和口令
# 第一行内容将被作为用户名
# 第二行内容将被作为口令
python -m py_buaa_login login --stdin

登出校园网

python -m py_buaa_login logout

查询网络是否可用

python -m py_buaa_login status

显示使用指南

python -m py_buaa_login --help
python -m py_buaa_login

编程接口

# 在确定有外网的前提下检查 selenium ChromeDrive 是否可用
# 返回 True 表示 selenium ChromeDrive 可用
from py_buaa_login import test
print(test(True, "https://www.google.com"))

# 检查登录情况
# 返回 True 表示网络可用
from py_buaa_login import login_check
print(login_check())

# 试图登录校园网
# 返回 True 表示登录成功
from py_buaa_login import login
print(login(username, password))

# 试图退出登陆校园网
# 返回 True 表示退出登录成功
from py_buaa_login import logout
print(logout())

Metadata

Release files for py-buaa-login 0.1.10

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

Source distribution (sdist)

Source distribution for py-buaa-login 0.1.10
File Size Uploaded Provenance Actions
py_buaa_login-0.1.10.tar.gz 6.1 kB Without provenance Details for py_buaa_login-0.1.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-buaa-login 0.1.10
File Interpreter ABI Platform Actions
py_buaa_login-0.1.10-py3-none-any.whl Python 3 none any Details for py_buaa_login-0.1.10-py3-none-any.whl

Total release size: 13.9 kB

Release files / py_buaa_login-0.1.10.tar.gz

Download URL py_buaa_login-0.1.10.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6735340d1b99307b7dc693275d5946901ba2d7e9b83726c835cd9f37d48d863c
BLAKE2b-256 checksum
How to use checksums
832cfd29f070ab4da1c6fe00e99061155822f9a01f7290112c9667d49ce8c0a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.4 CPython/3.13.12 Windows/11

Release files / py_buaa_login-0.1.10-py3-none-any.whl

Download URL py_buaa_login-0.1.10-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64a104abb4450be6d7f9162911384e371c6c72641848ae26f3fe6c3b206fc7fb
BLAKE2b-256 checksum
How to use checksums
f28306d7a514d32ef4d9460df4b2304bfa158d9bb4624ba6ef0a9d0117403d2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.4 CPython/3.13.12 Windows/11

Security for py-buaa-login 0.1.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files No provenance

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