全校课程目录
pkuinfo/pku-harness-plugins/plugins/course-catalog
官方内置
按课程名、教师、院系搜索全校开课,含上课时间(选课网查询含教室)。只读。
插件可以访问的内容
插件只能做这里声明过的事。安装之前,App 会给你看同一份清单。如果以后的更新需要更多权限,App 会再次询问你。
- 校园服务使用你的登录
- 选课网elective.pku.edu.cn
这些请求由 App 使用你已登录的会话发送,插件看不到你的密码、Cookie 或令牌。
- 其他网站
- dean.pku.edu.cn
- App 功能
无
- 工具
- 搜索全校课程course-catalog.search按课程名、教师或院系搜索某学期的全校开课读取
- 院系与学期列表course-catalog.departments课程搜索可用的院系代码和学期代码读取
- 选课网查课(含教室)course-catalog.searchElective在选课网按课程分类查课,含上课教室读取
需要的系统能力
联网
会访问互联网上的服务器。
校园登录
使用你已登录的校园会话,你的密码不会离开手机。
云端数据
不使用 PKU harness Cloud。
检查结果
- 由 pkuinfo 维护,源码在官方插件仓库中。
给 AI 的说明
PLUGIN.md 的正文部分,会和插件一起提供给模型。
全校课程目录(只读,不能选课/退课):
- course-catalog__search:教务部课表查询(公开,无需登录),按课程名/教师/院系搜某学期的开课,返回课号、班号、学分、教师、开课单位、上课时间(星期、节次和时间)、起止周。没有教室。
- 需要教室地点时用 course-catalog__searchElective(选课网,需要已登录校园账号,按课程分类查,较慢)。
- 教务部网站可能要求网页验证码,这时 search 会报 captcha_required:改用 searchElective(按课程分类和名称关键词查),或请用户到 https://dean.pku.edu.cn/service/web/courseSearch.php 自己查。
- 院系可以直接写名称(如"信息科学技术学院"),不确定时先用 course-catalog__departments 查代码。
- 学期代码形如 "25-26-1"(25-26 学年第 1 学期),默认当前学期。
- 用户想把某门课加进课表时,用 timetable__addCourse,按 sessions 里的 weekday、start、end、room 和 weeks(单双周看 weekType)逐个添加。
清单
PLUGIN.md 的 frontmatter,按原样显示。 来源: plugins/course-catalog/PLUGIN.md. 字段说明
spec: 1
id: course-catalog
name: 全校课程目录
description: 按课程名、教师、院系搜索全校开课,含上课时间(选课网查询含教室)。只读。
version: 0.2.1
author: pkuinfo
icon: catalog
homepage: https://github.com/pkuinfo/pku-harness-plugins/tree/main/plugins/course-catalog
# 全校课程目录 (pkucli crates/claspider): the dean's public course search (dean.pku.edu.cn, no
# login) and the elective system's course query (elective.pku.edu.cn, signed in, has rooms).
# Read-only: electing and dropping courses are not here. Ported from the TypeScript plugin.
network: [dean.pku.edu.cn]
campus: [elective]
shared: shared.yaml
tools:
search: tools/search.yaml
departments: tools/departments.yaml
searchElective: tools/searchElective.yaml
i18n:
en:
name: Course catalogue
description: Search every course at Peking University by name, teacher or department, with class times (Elective searches include rooms). Read-only.
tools:
search: { title: Search courses, summary: Find courses by name, teacher or department }
departments: { title: Departments and semesters, summary: Department and semester codes for course search }
searchElective: { title: Search Elective (with rooms), summary: Search the Elective system by category, with classrooms }{
"id": "course-catalog",
"name": "全校课程目录",
"description": "按课程名、教师、院系搜索全校开课,含上课时间(选课网查询含教室)。只读。",
"author": "pkuinfo",
"kind": "builtin",
"auth": "none",
"icon": "catalog",
"requires": [
"network",
"campus-session"
],
"scopes": [
"dean.pku.edu.cn",
"elective.pku.edu.cn"
],
"tags": [
"official",
"campus"
],
"version": "0.2.1",
"i18n": {
"en": {
"name": "Course catalogue",
"description": "Search every course at Peking University by name, teacher or department, with class times (Elective searches include rooms). Read-only."
}
}
}