geek_crawler icon indicating copy to clipboard operation
geek_crawler copied to clipboard

极客时间课程抓取脚本,支持输入账号密码后自动将极客时间的专栏课程保存到本地

Results 19 geek_crawler issues
Sort by recently updated
recently updated
newest added

在原来的代码基础上简单的修改了一下,实现下载指定的课程 修改点1.使用原来的exclude变量,存储想要下载的课程,大概在539行左右 ``` # 将exclude设置为指定要爬取的文章 exclude = ['快速上手C++数据结构与算法'] ``` 修改点2.将297行左右的 ``` if product.get('title', '') in self.exclude: 修改为 if product.get('title', '') not in self.exclude: ```

![image](https://user-images.githubusercontent.com/38487617/150719963-d1a47f0d-8083-4a84-aff9-6b2a1b25375c.png)

大神来看下呀: /Users/bo/PycharmProjects/pythonProject/main.py[line:550] - ERROR: 请求过程中出错了,出错信息为:Traceback (most recent call last): File "/Users/bo/PycharmProjects/pythonProject/main.py", line 547, in run(cellphone, pwd, exclude=exclude, get_comments=get_comments) File "/Users/bo/PycharmProjects/pythonProject/main.py", line 513, in run geek._article(aid, pro, file_type=file_type, get_comments=get_comments) # 获取单个文章的信息...

在一个专栏里有大于100个的文章时,该脚本最大只能保存100个文章。 查看代码后发现 _articles 方法中的 'data = res.json().get('data', {})' 返回值中的list最大只有100。如图: ![image](https://user-images.githubusercontent.com/58510192/125604313-0ad9f472-7c8a-464d-8318-e6865103341a.png)

我有50多门课(仅3个是视频课,其他都是文字版),只有20多门课能下载。请问是什么原因导致不能下载所有课程

I found a bug. If file_type is `.html`, the file suffix in the download directory is `.md`.

1. 添加指定课程id 2. 添加重试功能 3. 添加实时写入已经下载的文章id到历史文件中(因为主动关闭程序的时候,貌似没来得及写入到历史文件) 4. 密码写死功能校验 5. 优化部分代码

![image](https://user-images.githubusercontent.com/37319319/117443376-a08e3300-af6a-11eb-8e61-49e599400d1d.png)