GithubHelp home page GithubHelp logo

mmzou / geektime-dl Goto Github PK

View Code? Open in Web Editor NEW
552.0 16.0 169.0 86 KB

👾 Geektime-dl 是使用Go构建的快速、简单的极客时间下载器,支持专栏下载为PDF文档。

License: MIT License

Go 100.00%

geektime-dl's Introduction

geektime-dl

Go Report Card GitHub release

👾 Geektime-dl 是使用Go构建的快速、简单的 极客时间 下载器,并支持专栏下载为PDF文档。

视频下载已失效: 极客时间的视频是采用的阿里云视频私有加密方式,暂时无破解方法!

安装

必要条件

以下为必须安装依赖:

Note: FFmpeg的使用是为了最后视频文件合并成需要的格式。

Note: 借助chromedp/chromedp工具导出页面为PDF文档,该功能需要谷歌浏览器的支持。

使用go get安装

安装Geektime-dl,可以使用如下go get命令,或者从Releases 页面下载二进制文件.

$ go get github.com/mmzou/geektime-dl

入门

使用方法:

#下载
geektime-dl [OPTIONS] 课程ID  [目录ID]
#查看专栏、视频,登录及其他命令操作
geektime-dl [OPTIONS] command

包含命令

  login    登录极客时间
  who      获取当前帐号
  users    获取帐号列表
  su       切换极客时间帐号
  buy      获取已购买过的专栏和视频课程
  column   获取专栏列表
  video    获取视频课程列表
  help, h  帮助

视频和专栏的下载

只能下载已购买或者免费部分的视频、专栏。

$ geektime-dl 66
01 - 什么是微服务架构? 107.55 MiB / 107.54 MiB [==================================] 100.01% 1.42 MiB/s 1m15s
02 - 架构师如何权衡微服务的利弊? 92.10 MiB / 92.09 MiB [============================] 100.01% 1.69 MiB/s 54s
03 - 康威法则和微服务给架构师怎样的启示? 69.38 MiB / 69.38 MiB [=====================] 100.01% 1.68 MiB/s 41s
04 - 企业应该在什么时候开始考虑引入微服务? 114.20 MiB / 114.20 MiB [==================] 100.00% 1.41 MiB/s 1m21s
05 - 什么样的组织架构更适合微服务? 121.10 MiB / 121.09 MiB [========================] 100.00% 1.66 MiB/s 1m13s
06 - 如何理解阿里巴巴提出的微服务中台战略?65.23 MiB / 126.82 MiB [==========>---------] 51.43% 1.68 MiB/s 1m15s

只需下载课程中的某个目录

$ geektime-dl 66 2276
16 - 微服务监控系统分层和监控架构 11.22 MiB / 97.55 MiB [======>--------------------]  28.51% 1.30 MiB/s 01m06s

下载专栏时,可以同时下载专栏文章内容为PDF文档(需要谷歌浏览器支持

04 - 静态容器:办公用品如何表达你的内容? 13.94 MiB / 13.94 MiB [===================] 100.00% 2.23 MiB/s 6s
正在生成文件:【04 - 静态容器:办公用品如何表达你的内容?.pdf】 完成

: 如果生成文件提示失败,可以重复执行命令针对失败的文件再次生成,已生成的文件不会重复生成。如果尝试多次都是失败,可以Issues提问。

查看课程中可下载的目录

$ geektime-dl -i 66
+----+------+------+----------------------------------------------+---------+---------+---------+------+
| #  |  ID  | 类型 |                     名称                     |   SD    |   LD    |   HD    | 下载 |
+----+------+------+----------------------------------------------+---------+---------+---------+------+
|  0 | 2184 | 视频 | 01 什么是微服务架构?                         | 86.52M  | 53.45M  | 107.54M |  ✔   |
|  1 | 2185 | 视频 | 02 架构师如何权衡微服务的利弊?                 | 71.43M  | 44.12M  | 92.09M  |  ✔   |
|  2 | 2154 | 视频 | 03 康威法则和微服务给架构师怎样的启示?          | 54.32M  | 33.57M  | 69.38M  |  ✔   |
|  3 | 2186 | 视频 | 04 企业应该在什么时候开始考虑引入微服务?        | 90.07M  | 55.67M  | 114.20M |  ✔   |
|  4 | 2187 | 视频 | 05 什么样的组织架构更适合微服务?               | 90.22M  | 55.79M  | 121.09M |  ✔   |
|  5 | 2188 | 视频 | 06 如何理解阿里巴巴提出的微服务中台战略?        | 126.82M | 100.05M | 61.79M  |  ✔   |
|  6 | 2189 | 视频 | 07 如何给出一个清晰简洁的服务分层方式?          | 45.89M  | 62.07M  | 61.95M  |  ✔   |
|  7 | 2222 | 视频 | 08 微服务总体技术架构体系是怎样设计的?          | 85.67M  | 52.91M  | 109.83M |  ✔   |
|  8 | 2269 | 视频 | 09 微服务最经典的三种服务发现机制               | 94.00M  | 73.18M  | 45.21M  |  ✔   |

查看视频或专栏列表

#查看专栏列表
$ geektime-dl column
+----+-----+---------------------------+------------+------------------+------+
| #  | ID  |           名称            |    时间    |       作者       | 购买 |
+----+-----+---------------------------+------------+------------------+------+
|  0 |  42 | 技术与商业案例解读          | 2017-09-07 | 徐飞             |      |
|  1 |  43 | AI技术内参                | 2017-09-11 | 洪亮劼           |      |
|  2 |  48 | 左耳听风                  | 2017-09-20 | 陈皓             ||
|  3 |  49 | 朱赟的技术管理课           | 2017-11-09 | 朱赟             ||
|  4 |  50 | 邱岳的产品手记             | 2017-11-16 | 邱岳             |      |
|  5 |  62 | 人工智能基础课             | 2017-12-01 | 王天一           ||
|  6 |  63 | 赵成的运维体系管理课        | 2017-12-13 | 赵成             |      |
|  7 |  74 | 推荐系统三十六式           | 2018-02-23 | 刑无刀           |      |
|  8 |  76 | 深入浅出区块链             | 2018-03-19 | 陈浩             ||


#查看视频列表
$ geektime-dl video
+----+-----+------------------------------------------+------------+--------------+------+
| #  | ID  |                   名称                   |    时间    |     作者     | 购买 |
+----+-----+------------------------------------------+------------+--------------+------+
|  0 |  66 | 微服务架构核心20讲                         | 2018-01-08 | 杨波         ||
|  1 |  77 | 9小时搞定微信小程序开发                     | 2018-03-22 | 高磊         |      |
|  2 |  84 | 微服务架构实战160讲                        | 2018-05-03 | 杨波         ||
|  3 |  98 | 零基础学Python                            | 2018-05-25 | 尹会生       |      |

可恢复继续下载

Ctrl+C 中断下载。

存在 .download 临时文件,使用相同的参数执行 geektime-dl 命令,则下载进度将从上一个会话恢复。

登录

通过账号密码登录:

$ geektime-dl login --phone xxxxxx --password xxxxxx
极客时间账号登录成功: XXX

通过Cookie登录:

$ geektime-dl login --gcid xxxxxx --gcess xxxxxx --serverId 'xxxxxxx'
极客时间账号登录成功: XXX

参考仓库

License

MIT

Copyright (c) 2020-present, mmzou

geektime-dl's People

Contributors

chinuno-usami avatar fredgan avatar mmzou avatar wangle201210 avatar weiyongsheng avatar wjiec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geektime-dl's Issues

FATA[0005] exit status 1

下载某课程的时候,部分视频不能下载,出现如何的错误


59 - 神经网络的训练:新的PyTorch训练框架 0 B / 312.92 MiB [-------------------------------------------------------------------------------------------------------------------------------------] 0.00% 0s
60 - Transformer:如何通过Transformer榨取重要变量? 0 B / 243.33 MiB [--------------------------------------------------------------------------------------------------------------------------] 0.00% 0s
61 - Transformer代码实现剖析 0 B / 208.96 MiB [-------------------------------------------------------------------------------------------------------------------------------------------------] 0.00% 0s
63 - xDeepFM的代码解析 0 B / 124.41 MiB [-------------------------------------------------------------------------------------------------------------------------------------------------------] 0.00% 0s
68 - 高级模型融合技巧:Metades是什么? 0 B / 115.13 MiB [---------------------------------------------------------------------------------------------------------------------------------------] 0.00% 0s
73 - 深度迁移学习模型:ALBERT和ELECTRA 0 B / 70.09 MiB [----------------------------------------------------------------------------------------------------------------------------------------] 0.00% 0s
74 - 深度迁移学习模型的微调:如何使用TensorFlow在TPU对模型进行微调 0 B / 160.01 MiB [-----------------------------------------------------------------------------------------------------------] 0.00% 0s
75 - 深度迁移学习模型的微调:TensorFlow BERT代码简析 0 B / 233.46 MiB [-------------------------------------------------------------------------------------------------------------------------] 0.00% 0s
76 - 深度迁移学习的微调:如何利用PyTorch实现深度迁移学习模型的微调及代码简析 0 B / 106.41 MiB [-------------------------------------------------------------------------------------------------] 0.00% 0s
78 - 优化器:Lookahead,Radam和Lamb 0 B / 49.51 MiB [-------------------------------------------------------------------------------------------------------------------------------------------] 0.00% 0s
81 - UDA:一种系统的数据扩充框架 0 B / 97.75 MiB [----------------------------------------------------------------------------------------------------------------------------------------------] 0.00% 0s
82 - Label Smoothing和Logit Squeezing 0 B / 68.75 MiB [-----------------------------------------------------------------------------------------------------------------------------------------] 0.00% 0s
83 - 底层模型拼接:如何让不同的语言模型融合在一起从而达到更好的效果? 0 B / 65.80 MiB [---------------------------------------------------------------------------------------------------------] 0.00% 0s
FATA[0005] exit status 1
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --disable-x86asm
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
59 - 神经网络的训练:新的PyTorch训练框架.txt: Invalid data found when processing input

下载失败

当课程中没有视频也没有mp3的时候,就会下载失败,跳过
这样所有pdf就不会生成下载。

情况:最后5课没有mp3,下载mp3时,到这里就失败中断了,不会跳过失败的,去生成pdf
image
image

下载的PDF为空文件

windows下载的PDF好多文件为空的,-s类型参数怎么用的,可以不是pdf格式吗?

生成某些pdf 失败 FATA[0003] encountered exception 'Uncaught' (1:40)

已经下载完,在生成pdf阶段,前面能成功生成pdf,到某个章节就报错了,然后后面一直都是失败的直到结束,正在生成文件:【39 - 回溯算法:从电影《蝴蝶效应》中学习回溯算法的核心**.pdf】 失败
FATA[0003] encountered exception 'Uncaught' (1:40)

每日一课

似乎不支持每日一课的下载,不知道大佬能不能开发一下

FFmpeg不被调用

下载了课程,但是FFmpeg没用被调用,造成一个问题,10秒一个文件,几万个文件,Windows 10-64 bits

win10无法生成PDF

全是报错,可不可以指定命令不要生成PDF呢?

正在生成文件:【�[37;1m开篇词 - 跑步,不那么简单的事儿.pdf�[0m】 �[31;1m失败2, err=context deadline exceeded�[0m
正在生成文件:【�[37;1m01 - 跑两步就喘了,是不是我不适合跑步?.pdf�[0m】 �[31;1m失败2, err=context deadline exceeded�[0m
正在生成文件:【�[37;1m02 - 正确的跑步姿势是什么样的?.pdf�[0m】

Mac 使用的geektime-dl_0.2.2_macOS_64-bit版本下载视频报错

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x157a27b]

goroutine 60 [running]:
github.com/mmzou/geektime-dl/cli/cmds.extractVideoDownloadData.func1(0xc0002a4a50, 0xc0000b9040, 0xc00019e0f0)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/cli/cmds/download.go:213 +0xcb
created by github.com/mmzou/geektime-dl/cli/cmds.extractVideoDownloadData
/home/miaoke/go/src/github.com/mmzou/geektime-dl/cli/cmds/download.go:207 +0x772

课程名有空格,好像下载不了

直接下载课程的话,一直在不同章节间跳来跳去,但是不会下载。
指定章节下载的话,就说路径找不到。。
我查了一下,好像是路径中有空格的问题。
有好的解决办法吗?

win10上chromedp使用问题

win10上chromedp的文档可以写的详细一些,在使用中出现一些问题。生成PDF的时候会跳出很多窗口,并没有实现headless模式。

专栏下载报错

geektime-dl 180

level=fatal msg="open 深入拆解Tomcat & Jetty \MP3\开篇词 - Java程序员如何快速成长?.mp4.mp3.download: The system cannot find the path specified."

课程名称有tab字符

| 2 | 102659 | 视频 | 03 Elasticsearch简介及其发展历史 | 31.37M | 30.05M | 31.03M | ✔ |
| 3 | 102660 | 视频 | 04 | Elastic Stack家族成员及其应用场景 | 37.84M | 36.94M | 37.87M | ✔ |
比如这样的04课程后面的名字有空格或tab.下载时提示 The filename, directory name, or volume label syntax is incorrect.

panic: runtime error: index out of range [0] with length 0

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/mmzou/geektime-dl/downloader.Download(0x2bd2f, 0xc0002ead00, 0x11, 0xaa0069, 0x6, 0x1, 0xc000288480, 0x0, 0x0, 0x0, ...)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/downloader/downloader.go:43 +0xb45
github.com/mmzou/geektime-dl/cli/cmds.downloadAction(0xc0000f09a0, 0x0, 0xc0001c0e10)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/cli/cmds/download.go:72 +0x6fc
github.com/urfave/cli.HandleAction(0x9d3280, 0xaca0e8, 0xc0000f09a0, 0xc0000f09a0, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0x121
github.com/urfave/cli.Command.Run(0xa9d678, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa9d678, 0x0, 0xa9d678, ...)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/command.go:174 +0x581
github.com/mmzou/geektime-dl/cli/cmds.DefaultAction(0xc0000f0840, 0x0, 0x0)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:86 +0x10b
github.com/urfave/cli.HandleAction(0x9d3280, 0xaca0c8, 0xc0000f0840, 0x0, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0x121
github.com/urfave/cli.(*App).Run(0xc00011c540, 0xc000096440, 0x2, 0x2, 0x0, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:288 +0x650
main.main()
/home/miaoke/go/src/github.com/mmzou/geektime-dl/main.go:30 +0x4ce

下载视频课程报错

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x15f8a8e]

goroutine 31 [running]:
github.com/mmzou/geektime-dl/cli/cmds.extractVideoDownloadData.func1(0xc00022b730, 0xc000302320, 0xc0004a4000)
/Users/jesse/go/pkg/mod/github.com/mmzou/[email protected]/cli/cmds/download.go:213 +0xce
created by github.com/mmzou/geektime-dl/cli/cmds.extractVideoDownloadData
/Users/jesse/go/pkg/mod/github.com/mmzou/[email protected]/cli/cmds/download.go:207 +0x7a8

使用go get报错

➜ ~ go get github.com/mmzou/geektime-dl

github.com/mmzou/geektime-dl/cli/cmds

go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:50:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:55:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:60:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:79:8: invalid argument c.Args() (type cli.Args) for len
go/src/github.com/mmzou/geektime-dl/cli/cmds/download.go:31:11: c.Parent undefined (type *cli.Context has no field or method Parent)
go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:46:19: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:51:19: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:56:19: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:61:19: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:66:19: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:66:19: too many errors

课程名称不规则导致下载失败

| 3 | 102660 | 视频 | 04 | Elastic Stack家族成员及其应用场景 | 37.87M | 37.84M | 36.94M |
比如04后面课程名称,有空格或tab.报错
time="2020-06-09T10:51:25+08:00" level=fatal msg="CreateFile Elasticsearch核心技术与实战\MP4\04 -\tElastic Stack家族成员及其应用场景.mp4: The filename, directory name, or volume label syntax is incorrect."

下载新的购买视频的时候 报这个错误

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/mmzou/geektime-dl/downloader.Download(0x3e3ac, 0xc000296c60, 0x20, 0x16a9034, 0x6, 0x1, 0xc000293230, 0x0, 0x0, 0x0, ...)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/downloader/downloader.go:43 +0xb3e
github.com/mmzou/geektime-dl/cli/cmds.downloadAction(0xc00022e160, 0x0, 0xc000206b10)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/cli/cmds/download.go:72 +0x6f5
github.com/urfave/cli.HandleAction(0x15d7800, 0x16d2080, 0xc00022e160, 0xc00022e160, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0x11a
github.com/urfave/cli.Command.Run(0x16a6698, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x16a6698, 0x0, 0x16a6698, ...)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/command.go:174 +0x57a
github.com/mmzou/geektime-dl/cli/cmds.DefaultAction(0xc00022e000, 0x0, 0x0)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:86 +0x104
github.com/urfave/cli.HandleAction(0x15d7800, 0x16d2060, 0xc00022e000, 0x0, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0x11a
github.com/urfave/cli.(*App).Run(0xc000218380, 0xc000098180, 0x3, 0x3, 0x0, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:288 +0x649
main.main()
/home/miaoke/go/src/github.com/mmzou/geektime-dl/main.go:30 +0x4c7
➜ Downloads

如何使用ffmpeg 整合下载好的视频分片文件

使用geektime-dl 下载好后,在执行 ffmpeg时 发现本地没有安装 导致执行失败了。

后来重新安装了ffmpeg了,现在执行 ffmpeg的什么命令 可以对 下载好的视频分片文件 进行整合呢

FATA[0361] context deadline exceeded

正在生成文件:【19 - 总结(一):微服务设计和拆分要坚持哪些原则?.pdf】 失败2, err=context deadline exceeded
正在生成文件:【20 - 总结(二):分布式架构关键设计10问.pdf】 失败2, err=context deadline exceeded
正在生成文件:【结束语 - 所谓高手,就是跨过坑和大海!.pdf】 失败2, err=context deadline exceeded
正在生成文件:【基于DDD的微服务设计实例代码详解.pdf】 失败2, err=context deadline exceeded
正在生成文件:【抽奖|《DDD实战课》沉淀成书了,感谢有你!.pdf】 失败2, err=context deadline exceeded
正在生成文件:【期末测试 - 有关DDD的内容,你掌握了多少呢?.pdf】 失败2, err=context deadline exceeded
FATA[0361] context deadline exceeded

panic: runtime error: index out of range [0] with length 0

一开始都可以登录并下载成功视频课的,可突然下载一半就下载不了了,试了很多次重启电脑也不行了,执行geektime-dl 190报错:
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/mmzou/geektime-dl/downloader.Download(0x17bb2, 0x11f45f60, 0x11, 0x568392, 0x6, 0x1, 0x1200a240, 0x0, 0x0, 0x0, ...)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/downloader/downloader.go:43 +0x8dd
github.com/mmzou/geektime-dl/cli/cmds.downloadAction(0x11c24420, 0x11c0fa00, 0x0)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/cli/cmds/download.go:72 +0x57a
github.com/urfave/cli.HandleAction(0x4c3d00, 0x592594, 0x11c24420, 0x11c24420, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0xe3
github.com/urfave/cli.Command.Run(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/command.go:174 +0x4a4
github.com/mmzou/geektime-dl/cli/cmds.DefaultAction(0x11c24370, 0x0, 0x0)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:86 +0xac
github.com/urfave/cli.HandleAction(0x4c3d00, 0x592584, 0x11c24370, 0x0, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0xe3
github.com/urfave/cli.(*App).Run(0x11c01420, 0x11c0c040, 0x2, 0x2, 0x0, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:288 +0x575
main.main()
/home/miaoke/go/src/github.com/mmzou/geektime-dl/main.go:30 +0x3f0

运行环境:macos 10.14.5 (18F132)、geektime-dl version dev
谢谢!

go get错误(MacOS 10.15.7)

github.com/mmzou/geektime-dl/cli/cmds
../go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:50:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:55:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:60:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:79:8: invalid argument c.Args() (type cli.Args) for len
../go/src/github.com/mmzou/geektime-dl/cli/cmds/download.go:31:11: c.Parent undefined (type *cli.Context has no field or method Parent)
../go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:46:19: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:51:19: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:56:19: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:61:19: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:66:19: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/mmzou/geektime-dl/cli/cmds/login.go:66:19: too many errors

下载课程时报内存溢出

image
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x1c pc=0x53b2e2]

goroutine 15 [running]:
github.com/mmzou/geektime-dl/cli/cmds.extractVideoDownloadData.func1(0x121b7648, 0x121c82a0, 0x12195a80)
C:/Users/EDZ/go/pkg/mod/github.com/mmzou/[email protected]/cli/cmds/download.go:213 +0xb2
created by github.com/mmzou/geektime-dl/cli/cmds.extractVideoDownloadData
C:/Users/EDZ/go/pkg/mod/github.com/mmzou/[email protected]/cli/cmds/download.go:207 +0x5a8

win10-64x下载PDF失败,报错。

首先,我是有安装chrome的
image

运行时报错信息如下
image

程序运行过程中,会启动chorme(就是在双击了桌面的chrome图标),但是地址栏是空的,什么页面都没打开

这个错是因为我chrome的版本不对的原因吗?

下载视频时报如下错误

D:>geektime-dl 265
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/mmzou/geektime-dl/downloader.Download(0x2bd2f, 0xc00050cb20, 0x11, 0xaa0069, 0x6, 0x1, 0xc00009c450, 0x0, 0x0, 0x0, ...)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/downloader/downloader.go:43 +0xb45
github.com/mmzou/geektime-dl/cli/cmds.downloadAction(0xc0001309a0, 0x0, 0xc0001fce20)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/cli/cmds/download.go:72 +0x6fc
github.com/urfave/cli.HandleAction(0x9d3280, 0xaca0e8, 0xc0001309a0, 0xc0001309a0, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0x121
github.com/urfave/cli.Command.Run(0xa9d678, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa9d678, 0x0, 0xa9d678, ...)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/command.go:174 +0x581
github.com/mmzou/geektime-dl/cli/cmds.DefaultAction(0xc000130840, 0x0, 0x0)
/home/miaoke/go/src/github.com/mmzou/geektime-dl/cli/cmds/cmds.go:86 +0x10b
github.com/urfave/cli.HandleAction(0x9d3280, 0xaca0c8, 0xc000130840, 0x0, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0x121
github.com/urfave/cli.(*App).Run(0xc00015a540, 0xc0000044c0, 0x2, 0x2, 0x0, 0x0)
/home/miaoke/go/pkg/mod/github.com/urfave/[email protected]/app.go:288 +0x650
main.main()
/home/miaoke/go/src/github.com/mmzou/geektime-dl/main.go:30 +0x4ce

一个课程中35课之前都能下载,大于35课都无法下载

GeekTime中有一个课程可以下载前35个视频,第36到最后一个都无法下载。

不知道是不是编码问题导致的。

id号为272,视频的ID号为226756,之前可以下载的ID号都为205635以下,不知道是不是后期上传的视频编码与之前的不一样导致的。

可以提供帐号与密码对此视频进行测试。

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.