{"id":26660743,"url":"https://github.com/hantang/smartedu-dl-py","last_synced_at":"2025-08-12T18:14:22.098Z","repository":{"id":266934407,"uuid":"899008313","full_name":"hantang/smartedu-dl-py","owner":"hantang","description":"国家中小学智慧教育平台资源下载工具","archived":false,"fork":false,"pushed_at":"2025-03-16T04:32:27.000Z","size":7382,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T12:19:54.047Z","etag":null,"topics":["downloader","smartedu","textbook"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hantang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-05T13:00:37.000Z","updated_at":"2025-03-16T04:32:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"dca7eb34-22eb-4719-a8f9-adebbae8b62d","html_url":"https://github.com/hantang/smartedu-dl-py","commit_stats":null,"previous_names":["hantang/smartedu-dl","hantang/smartedu-dl-py"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/hantang/smartedu-dl-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantang%2Fsmartedu-dl-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantang%2Fsmartedu-dl-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantang%2Fsmartedu-dl-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantang%2Fsmartedu-dl-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hantang","download_url":"https://codeload.github.com/hantang/smartedu-dl-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantang%2Fsmartedu-dl-py/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270110285,"owners_count":24529029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["downloader","smartedu","textbook"],"created_at":"2025-03-25T12:20:02.049Z","updated_at":"2025-08-12T18:14:21.899Z","avatar_url":"https://github.com/hantang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smartedu-dl (`py`)\n\n![build](https://github.com/hantang/smartedu-dl-py/actions/workflows/release.yml/badge.svg)\n![GitHub Tag](https://img.shields.io/github/v/tag/hantang/smartedu-dl-py)\n\n\u003e 智慧教育平台资源下载工具\n\n## 📝 功能说明\n\n主要支持[`smartedu.cn` 国家中小学智慧教育平台](https://basic.smartedu.cn/tchMaterial)教材、课件（PDF 格式）下载存储。\n\n🚨 **注意**：\n如果下载中出现“检测到病毒”，请尝试暂时关闭相关病毒检测再下载使用\n（macos 系统在【设置/隐私】中设置允许打开）。\n由于软件没有认证措施，`Pyinstaller`打包可能存在误报。\n提供的下载包都是通过 Github Actions 自动编译提交的。\n有条件的，也可按照下面说明下载仓库代码后在本地执行（需要预先配置 Python 环境）。\n\n## ⌨️ 命令行模式/CLI\n\n```shell\nUsage: app-cli.py [OPTIONS]\n\n  智慧教育平台资源下载工具\n\nOptions:\n  -h, --help            帮助信息\n  -d, --debug           启用调试模式\n  -i, --interactive     交互模式\n\n  -t, --formats 资源类型  配置需要下载类型，如PDF、MP3（默认仅PDF）\n  -a, --auth 'MAC id=\"...\"' 登录信息，\n  -b, --backup           尝试用备用解析方式（不一定是最新版）\n\n  -u, --urls TEXT       URL路径列表，用逗号分隔\n  -f, --list_file PATH  包含URL的文件\n  -o, --output PATH     下载文件保存目录\n```\n\n用例：\n\n```shell\n# 更新依赖\npip install -r requirements.txt\n\n# 切换目录 或者 python src/app-cli.py\ncd src/\n\n# 交互模式，进入后选择：\n# 1. 查询科目列表：展示电子教材（学业阶段）-\u003e学科、版本等；支持输入0回退，输入exit退出。\n# 2. 手动输入URL：教材或课件详情页的链接，可逗号分隔。\npython app-cli.py\npython app-cli.py -i # 交互模式（同上），-i 参数可选。不要和-u/-f连用\n\n# 其他参数：-o 修改默认目录，--formats 提供更多资源类型下载【暂不支持PDF】\npython app-cli.py -o $SAVEDIR\npython app-cli.py --formats pdf,mp3\n\n# 命令模式:\n# URL: 链接字符串，逗号分隔多个链接\n# FILE: 单个文件名，文件内链接每行一个\npython app-cli.py -u $URL\npython app-cli.py -u $URL -f $FILE\n```\n\n| macos                            | windows                          |\n| -------------------------------- | -------------------------------- |\n| ![](snapshots/cli-snapshot-mac.png) | ![](snapshots/cli-snapshot-win.png) |\n\n## 🖥️ 图形界面模式/GUI\n\n```shell\n# 更新依赖\npip install -r requirements.txt\npip install -r requirements-gui.txt\n\n# 支持解析下载PDF、音频等格式。\ncd src\npython app-tk.pyw\n```\n\n| 界面     | macos                              | windows                            |\n| -------- | ---------------------------------- | ---------------------------------- |\n| 教材列表 | ![](snapshots/gui-snapshot-mac1a.png) | ![](snapshots/gui-snapshot-win1b.png) |\n| 手动输入 | ![](snapshots/gui-snapshot-mac2a.png) | ![](snapshots/gui-snapshot-win2b.png) |\n\n## 🌐 依赖\n\n参见: `requirements.txt`、`requirements-gui.txt`文件。\n\n## 🚨 备注：配置登录信息\n\n如果下载教材不是最新版，需要配置登录信息，找到 **X-ND-AUTH** 字段。\n\n大致步骤：\n1. 浏览器打开：\u003chttps://basic.smartedu.cn/tchMaterial\u003e \n2. 点击其中一本教材\n3. 弹出新的页面中选择登录\n4. 登录后重新打开教材页面，鼠标右键菜单中选择 **检查**（Inspect）/或者 `F12` 打开开发者工具 （DevTools）.\n5. 之后步骤如下图，找到 **X-ND-AUTH** 字段\n    ![](./snapshots/steps.png)\n6. 命令行版本需要使用 `-a` 参数；图形界面版本在 **登录信息** 框中填入。\n\n## 💡 相关\n\n- [hantang/smartedu-dl-go](https://github.com/hantang/smartedu-dl-go) 新版本\n- [happycola233/tchMaterial-parser](https://github.com/happycola233/tchMaterial-parser)\n- [52beijixing/smartedu-download](https://github.com/52beijixing/smartedu-download)\n- 图标来自或修改自：\u003chttps://www.smartedu.cn/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhantang%2Fsmartedu-dl-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhantang%2Fsmartedu-dl-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhantang%2Fsmartedu-dl-py/lists"}