Releases: mcitem/lnuElytra
Releases · mcitem/lnuElytra
Release list
v0.0.8
分发请标注项目原地址:https://github.com/mcitem/lnuElytra
GUI仓库:https://github.com/mcitem/lnu_elytra
支持HarmonyOS、Android、Windows、macos、ios
网盘https://mcitem.lanzout.com/b002vz2mti
密码:mcitem
v0.0.8
- fix: mmsfjm == "0" by @mcitem in #4
- feat: automatically check login status
Full Changelog: v0.0.7...v0.0.8
v0.0.7
v0.0.7 feat: PythonAsyncClient,flutter,check_login_fn
Full Changelog: v0.0.6...v0.0.7
v0.0.6
feat: pyo3_tracing_subscriber
Usage:
from lnu_elytra.tracing import Tracing, GlobalTracingConfig, BatchConfig, subscriber, layers
from lnu_elytra import Client;
import asyncio
cfg = GlobalTracingConfig(
BatchConfig(
subscriber.Config(
layers.file.Config(
file_path=None,
pretty=True,
filter="info",
json=False,
)
)
)
)
def main():
client = Client()
u = input("请输入用户名:")
p = input("请输入密码:")
tgs = input("请输入教学班(多个用逗号分割):")
tgs = tgs.split(",")
try:
client.login(u, p)
except Exception as e:
print(f"登陆失败,请检查用户名或者密码是否正确:{e}")
return
while True:
try:
client.init()
except Exception as e:
print(f"初始化失败,正在重试:{e}")
asyncio.sleep(1)
continue
print("初始化成功")
break
for tg in tgs:
while True:
try:
result = client.select_course(tg)
if result.flag == "1":
print(f"选课成功:{result.message}")
else:
print(f"选课失败:{result.message}")
continue
except Exception as e:
print(f"选课失败:{e}")
asyncio.sleep(1)
continue
break
if __name__ == "__main__":
async def async_main():
async with Tracing(cfg):
main()
pass
asyncio.run(async_main())