中国大学MOOC (www.icourse163.org) - Rhilip/cn-mooc-dl GitHub Wiki

icourse163-dl.py

Script for downloading download MOOCs (include Video,Subtitle and Text...) in icourse163.org.

Instructions

1) Get key information from website and fill those to "icourse163-dl.py"

  • Open icourse163.org,and login in with 163 email,NOT OAUTH.
  • Click in the course you want to download.and Open The 'Developer Tools'(In chrome,F12),turn to Network panel.Open Filter and choose "XHR". For example, Announce box
  • Then turn to content menu.You will find a file named "CourseBean.getLastLearnedMocTermDto.dwr" luckly (though other dwr is OK). In it's Header,We will find the information:Cookies and Session(Get from cookies).We need that!! Find Cookie and Session
  • Open the file "icourse163-dl.py",and fill in the forms at Config part.
# Warning:Before start ,You should fill in these forms.
# Course url (with key "tid")
url = ''
# cookies
raw_cookies = ''
downloadSrt = True  # Download Chinese or English Srt (True or False)
  • Remember a "Session-Cookies" pair can be used for a long time until the service reply message:"not_auth" or "Session Error" ,Then you should change it into a new one.But in it's survival time,you can get another course only to change course url.(Even the course you didn't participate in,Just need the right key "tid")

2) Run this script

  • just run it and you will get some file.
dllink.txt : the video download link
ren.bat : Rename script for downloaded video.Before use,edit it so make videoes easier to organize
some PDF or SRT(if exists and "downloadSrt = True")
  • Use Download tools (,for example IDM...) to download course video.
  • Use "ren.bat" to rename the downloaded video.
  • Sort those videos and documents logically