Giter Site home page Giter Site logo

jadedever / geektime-downloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nicoxiang/geektime-downloader

0.0 0.0 0.0 120 KB

快速的极客时间课程下载器,支持下载专栏 (PDF/Markdown) 和视频课 (TS)

License: MIT License

Go 100.00%

geektime-downloader's Introduction

geektime-downloader

geektime-downloader 支持下载专栏为 PDF/Markdown 文档和下载视频课。

go report card MIT license

Usage

Prerequisites

  • Chrome installed

Install form source

# Go 1.16+
go install github.com/nicoxiang/geektime-downloader@latest

# Go version < 1.16
go get -u github.com/nicoxiang/geektime-downloader@latest

Download binary files

See release page

Sample

## Windows 为例
## Windows 推荐使用 Windows Terminal 打开

## 账号密码方式登录(常用)
> geektime-downloader.exe -u "phone number"
## cookie 方式登录
> geektime-downloader.exe --gcid "gcid" --gcess "gcess"

Help

## Windows 为例
> geektime-downloader.exe -h

Geektime-downloader is used to download geek time lessons

Usage:
  geektime-downloader [flags]

Flags:
      --comments         是否需要专栏的第一页评论 (default true)
  -f, --folder string    专栏和视频课的下载目标位置 (default "")
      --gcess string     极客时间 cookie 值 gcess
      --gcid string      极客时间 cookie 值 gcid
  -h, --help             help for geektime-downloader
      --output int8      下载专栏的输出格式(1pdf,2markdown,3all) (default 1)
  -u, --phone string     你的极客时间账号(手机号)
  -q, --quality string   下载视频清晰度(ld标清,sd高清,hd超清) (default "sd")  

Note

  1. 文件下载目标位置可以通过 help 查看。默认情况下 Windows 位于 %USERPROFILE%/geektime-downloader 下;Unix, 包括 macOS, 位于 $HOME/geektime-downloader 下

  2. 如何查看课程 ID?

打开极客时间课程列表页,选择你想要查看的课程,在新打开的课程详情 Tab 页,查看 URL 最后的数字,例如下面的链接中 100056701 就是课程 ID:

https://time.geekbang.org/column/intro/100056701
  1. Ctrl + C 退出程序

  2. 默认情况下载专栏的输出格式只有 PDF,可以按需选择是否需要下载 Markdown 格式(--output 参数),Markdown 格式虽然显示效果上不及 PDF,但优势为可以显示完整的代码块(PDF 代码块在水平方向太长时会有缺失)并保留了原文中的超链接。

  3. 如果选择下载所有后中断程序,可重新进入程序继续下载

  4. 通过密码登录的情况下,为了避免多次登录账户,会在目录 UserConfigDir/geektime-downloader 下存放用户的登录 cookie,如果不是在自己的电脑上执行,请在使用完毕程序后手动删除

Inspired by

geektime-downloader's People

Contributors

dependabot[bot] avatar nicoxiang avatar yola-0316 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.