Comments (5)
全部这样吗?删掉重试呢?使用文本编辑器打开看看,里面是二进制内容还是HTML的"页面错误"内容
from course-crawler.
有空加个Debug用的log文件吧 @Foair 把网址等信息,都记录下来,他这个还真不好测试……
from course-crawler.
这个是用notepad++打开后显示的
from course-crawler.
喵?Σ(⊙▽⊙"a我直接用requests测试是可以下的,那个文件修改扩展名为HTML后打开也是自动跳转下载的,emmmmmmm不资到为撒能把那个页面download下来
from course-crawler.
问题在我的课程C++程序设计入门(下)重现
解决方法:
经测试,使用session的CANDY对课件进行下载将会重定向到一个页面后使用js进行下载,而直接使用requests则会直接下载内容,故可以直接使用requests下载或者使用参数将session注释掉,两者选择其一即可,建议使用第二种
1.
file_name = '%s %s' % (counter, file_name) # 下面是要修改的内容
with open(WORK_DIR.file(file_name), 'wb') as f:
r = requests.get('https://www.icourse163.org/course/attachment.htm', params=params)
f.write(r.content)
file_name = '%s %s' % (counter, file_name) # 下面是要修改的内容
CANDY.download_bin('https://www.icourse163.org/course/attachment.htm',
WORK_DIR.file(file_name), params=params, cookies={'STUDY_SESS': None})
位置在study_mooc.py 167行左右
from course-crawler.
Related Issues (20)
- **大学MOOC课程解析一半出错 HOT 4
- 添加新的网站支持 HOT 9
- 针对现阶段某些bug的修复&新功能使用的说明 HOT 5
- 网易公开课抓取不完整 HOT 12
- **大学mooc的考研课程连接地址不行
- UnicodeEncodeError: 'gbk' codec can't encode character '\u2022' in position 9: illegal multibyte sequence HOT 1
- problem from links HOT 2
- 执行完毕后找不到课程文件夹
- 执行mooc.py报错 HOT 2
- 神也是粉丝
- Bug: 当网易云课堂 MOOC 的课程章节列表乱序时,下载的课件以及视频章节数错误 HOT 3
- 下载学堂在线课程,课程信息和字幕都有,但是视频的链接没有 HOT 2
- 程序运行出错 HOT 1
- 网易**大学MOOC视频格式变化了,下载不了了 HOT 11
- 好大学MOOC课程 没有视频下载地址等内容 HOT 2
- 程序运行报错 HOT 1
- 学堂在线无法下载视频
- 使用course-crawler如何只下载文档,不下载视频
- **大学MOOC下载报错 HOT 1
- 现在网易云课堂的还能下么。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from course-crawler.