Git Product home page Git Product logo

mooc-dl's Introduction

哎呀!被发现了(*/ω\*)~

Gmail Spotify Twitter telegram NPM PyPI

这里是 Nyakku,只是时雨家一只普普通通的小猫猫~

  • 🌐 中文 · 日本語 · English (learning)
  • ⏰ 8:50 - 26:30 「UTC+8
  • 🔗 nyakku.moe

Tech Stacks 🐾

Python TensorFlow PyTorch
JavaScript TypeScript Vue.js
Rust C++ C

Development Environment 🍻

Apple Silicon M1 SoC vscode

Spotify Playing 🎧

Spotify Now Playing

mooc-dl's People

Contributors

arcticlampyrid avatar dependabot-preview[bot] avatar dependabot[bot] avatar frzmtrsprt avatar siguremo avatar zpcc 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

mooc-dl's Issues

看到断点续传最近不希望提供

我在研究代码,不过最后还是没有想出来自己的解决方法

后来想到一个简单的, 记住下载的最后一个 数字 X:

然后下一次下载的时候:

在line 249里,直接X+1 for i, resource in enumerate(resource_list[X+1:]):

相当于一个断点续传。

🐛 下载时出现「FileNotFoundError」

调用方式

python mooc-dl.py https://www.icourse163.org/course/SWJTU-1207477804

环境信息

  • OS: Windows 11
  • Python: 3.8.10

问题简述

心理咨询理论和技术 - 西南交通大学
1207477804
Traceback (most recent call last):
  File "D:\XMIND\MoocDownload\mooc-dl\utils\crawler.py", line 26, in download_bin
    with open(tmp_path, "wb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '心理咨询理论和技术 - 西南交通大学\\11 团体心理工作技术\\11.1 团体咨询技术:保护干预 11.2 团体咨询技术:激励干预 11.2.1 激励干预1 11.2.2 激励干预2 11.3 团体过程分析 11.3.1 团体过程分析概述 11.3.2 团体过程分析模型 11.4 组员的行为 11.4.1 识别难处理的组员 11.4.2 特罗泽的分类:阻抗行为、操控行为、帮助行为 11.4.3 特罗泽的分类:情绪性行为、小团体行为\\11.1.1 团体咨询技术:保护干预_zh.srt.t'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "mooc-dl.py", line 311, in <module>
    url, file_path, params = parse_resource(resource, token)
  File "mooc-dl.py", line 184, in parse_resource
    spider.download_bin(srt_url, srt_path)
  File "D:\XMIND\MoocDownload\mooc-dl\utils\crawler.py", line 35, in download_bin
    os.remove(tmp_path)
FileNotFoundError: [WinError 3] The system cannot find the path specified: '心理咨询理论和技术 - 西南交通大学\\11 团体心理工作技术\\11.1 团体咨询技术:保护干预 11.2 团体咨询技术:激励干预 11.2.1 激励干预1 11.2.2 激励干预2 11.3 团体过程分析 11.3.1 团体过程分析概述 11.3.2 团体过程分析模型 11.4 组员的行为 11.4.1 识别难处理的组员 11.4.2 特罗泽的分类:阻抗行为、
操控行为、帮助行为 11.4.3 特罗泽的分类:情绪性行为、小团体行为\\11.1.1 团体咨询技术:保护干预_zh.srt.t'

预期行为

额外信息

是否愿意为此贡献代码

🐛 下载课程出现错误代码

调用方式

环境信息

  • OS: Windows 10 1909 64Bit
  • Python: Python 3.9.1
  • Others: 其它信息

问题简述

预期行为

额外信息

是否愿意为此贡献代码

🐛 一直try again

环境信息

  • OS: win10
  • Python: 3.8 (conda)

问题简述

下载视频,前几章很顺利,但后边就开始没速度,然后就是一直
[warn] request timeout, trying again...
猜测可能是被api限速了?
换了一次网络,好了一小会,然后又没速度了,接着还是warn

🐛 無法下載 出現 TypeError: 'NoneType'

调用方式

python mooc-dl.py "https://www.icourse163.org/course/NJUE-1458311167"

环境信息

  • OS: windows 10
  • Python: Python 3.10.9

问题简述

Python大数据分析 - 南京财经大学
1458311167
Traceback (most recent call last):
File "Z:\mooc-dl-master\mooc-dl.py", line 318, in
url, file_path, params = parse_resource(resource, token)
File "Z:\mooc-dl-master\mooc-dl.py", line 199, in parse_resource
pdf_url = res.json()["results"]["learnInfo"]["textOrigUrl"]
TypeError: 'NoneType' object is not subscriptable

额外信息

是否愿意为此贡献代码

🐛 下载失败

调用方式

python mooc-dl.py http://www.icourse163.org/learn/kaopei-1461594163?tid=1462381444#/learn/announce

环境信息

  • OS: windows10
  • Python: Python 3.8.5

问题简述

下载MOOC视频

使用默认账号:

Traceback (most recent call last):
  File "mooc-dl.py", line 216, in <module>
    term_id, course_name = get_summary(url)
  File "mooc-dl.py", line 65, in get_summary
    term_id = re.search(r'termId : "(\d+)"', res).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

修改config.json为自己的账号密码(账号密码无误):

密码错误!
Traceback (most recent call last):
  File "mooc-dl.py", line 216, in <module>
    term_id, course_name = get_summary(url)
  File "mooc-dl.py", line 65, in get_summary
    term_id = re.search(r'termId : "(\d+)"', res).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

🐛 使用其他路径保存不会下载视频

调用方式

$ python3 mooc-dl.py https://www.icourse163.org/course/PAEU-1003647009\?tid\=1450354443

环境信息

  • OS: ArchLinux
  • Python: 3.8.6
  • Others: 其它信息

问题简述

使用其他路径, 下载的文件夹里没有视频

https://www.icourse163.org/course/PAEU-1003647009?tid=1450354443

预期行为

额外信息

在配置文件里使用过 /tmp/..., /run/media/... 位置, 但都没有视频. 使用默认配置会正常.

是否愿意为此贡献代码

🐛 课程权限已到期

调用方式

python mooc-dl.py https://www.icourse163.org/course/BUCT-1002990004?tid=1470662444

环境信息

  • OS: Windows 10
  • Python: Python 3.9.6

问题简述

控制台报错:[ERROR] 无法获取课件信息!原因:「课程权限已到期,请重新购买」,疑似该课程已关闭。
调试程序后发现在mooc-dl.py文件中的get_courseinfo()函数返回值为:{'status': {'code': 403, 'message': '课程权限已到期,请重新购买'}, 'results': None, 'extraInfo': None}。

测试了多个课程链接,都有这样的报错。

预期行为

额外信息

是否愿意为此贡献代码

枯了,还是 variable 'ext' referenced before assignment

Foair/course-crawler#37 (comment)

$ python mooc-dl.py  https://www.icourse163.org/course/0701TJU046-1003168003
线性代数学习指导 - 同济大学
1003168003
Traceback (most recent call last):
  File "mooc-dl.py", line 219, in <module>
    resource_list = get_resource(term_id, token)
  File "mooc-dl.py", line 160, in get_resource
    file_path += ext
UnboundLocalError: local variable 'ext' referenced before assignment

调用时出现相关json解析出错

调用方式

python mooc-dl.py https://www.icourse163.org/course/ZJU-93001?tid=1003997005

环境信息

  • OS: win10
  • Python: Python 3.7

问题简述

在调用相关命令时,出现

数据结构 - 浙江大学
93001
Traceback (most recent call last):
  File "E:\project\mooc-dl\mooc-dl.py", line 227, in <module>
    resource_list = get_resource(term_id, token, file_types=CONFIG["file_types"])
  File "E:\project\mooc-dl\mooc-dl.py", line 139, in get_resource
    course_info = get_courseinfo(term_id, token)
  File "E:\project\mooc-dl\mooc-dl.py", line 56, in get_courseinfo
    print('res响应结果:{},data:{}'.format(res.josn(),data))
AttributeError: 'Response' object has no attribute 'josn'

无法解析相关的一个返回结果

🐛 PDF下载失败, 内容为XML

调用方式

py3 mooc-dl.py https://www.icourse163.org/course/CSU-1206894807

环境信息

  • OS: ArchLinux
  • Python: 3.9.5
  • Others: 校园网

问题简述

下载的PDF, 其中一些的内容为:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>AccessDenied</Code>
  <Message>error_expires_timeout</Message>
  <Resource>%2Fedu-lesson-pdfsrc%2F87738B322EFBC1702D16411A66CBB130-1574991673443</Resource>
  <RequestId>77b97717-bce8-4924-b8b3-8d73df430074</RequestId>
</Error>

预期行为

PDF可以正常阅读

额外信息

去网页上查看, 发现下载出错的PDF可以正常阅读

今天重新下载一遍, 发现有问题的PDF集合不是相同的

出错的PDF集合从列表中间开始, 一直到末尾

是否愿意为此贡献代码

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.