geektime-cli
极客时间课程命令行工具,支持浏览器登录、查询课程与文章、下载已购课程,以及将已下载内容导出为 Markdown 或 PDF。
安装
需要 Python 3.10+、Google Chrome。下载视频还需要 ffmpeg。PDF 导出依赖 WeasyPrint 的系统库,详见 WeasyPrint 安装说明。
uv tool install geektime-cli
geektime --help
也可以在虚拟环境中执行 python -m pip install geektime-cli。从源码安装时,在项目根目录执行 uv tool install .。
登录
geektime login
geektime login --check
登录会打开 Chrome。请在浏览器中手动完成登录。凭据保存到用户配置目录,不写入项目目录;请勿提交配置、缓存或下载内容。
查询
geektime course list
geektime course list --scope all --type c1,c3
geektime course info 100001 --type c1
geektime course chapters 100001
geektime article detail 830657
geektime course list --json
geektime article detail 830657 --raw
--json 和 --raw 不能同时使用。查询优先获取远端数据;网络错误或服务端 5xx 时,已有缓存可用于回退。登录失效会明确报错。
课程分类:c1 专栏、c3 视频课、p 公开课、d 每日一课、q 大厂案例课。
下载与导出
geektime download --type c1 --text-only
geektime download --limit 3 --output-dir ~/Downloads/GeekTime
geektime export markdown --course "课程名称" --download-dir ~/Downloads/GeekTime
geektime export pdf --course "课程名称" --download-dir ~/Downloads/GeekTime
geektime config show
仅下载和使用你有权访问的内容,并遵守极客时间的服务条款。项目不附带任何课程内容或账户凭据。
开发
python -m pip install -e '.[dev]'
python -m pytest -q
许可证
BSD 3-Clause,见 LICENSE。
Metadata
Release files for geektime-cli 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| geektime_cli-1.1.0.tar.gz | 34.3 kB | Without provenance | Details for geektime_cli-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| geektime_cli-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for geektime_cli-1.1.0-py3-none-any.whl |
Total release size: 73.1 kB
Release files / geektime_cli-1.1.0.tar.gz
| Download URL | geektime_cli-1.1.0.tar.gz |
|---|---|
| Size | 34.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2fbc40d19be5c2c87aed40918da2c3f9a41428632b7505edeeca1046c623a3f
|
|
BLAKE2b-256 checksum How to use checksums |
351e47098b52820c77ecaa9bf1f2cbd118fa1a4629c266717ba7424c06284e4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / geektime_cli-1.1.0-py3-none-any.whl
| Download URL | geektime_cli-1.1.0-py3-none-any.whl |
|---|---|
| Size | 38.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6090ef468b166d8841ed18dd3d9d65b5a86b61c50a5a23529423fefc8229ebd
|
|
BLAKE2b-256 checksum How to use checksums |
8b25075583b15863252fcd7286d2340cecc29ed19f694f71c7977d4b4560e4e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for geektime-cli 1.1.0
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.