You are on page 1of 4

Script to download Coursera(new version) Vide... https://introetkapil.wordpress.com/2016/05/22/s...

introet – KAPIL
The greatest WordPress.com site in all the land!

Script to download Coursera(new version) Video Lec


tures in one go
Update : Following the changes in the coursera user interface, the method mentioned below no longer works.

Hi,

To automatically download coursera(new version as on 22/05/2016) video lectures –

1. Enroll for the course.


2. Navigate within the course to any one  video lecture of any week.You should get to this type of page of
your course (Use chrome)-

3. Right click anywhere on the page and open inspect element. In inspect element copy-paste the follow-
ing code, press Enter and then wait for 8 seconds. This will download all lectures in the week with delay of
8 seconds between every video. To download for all weeks, repeat step 2 and 3 for every week. –

function nextLesson() {

1 of 4 4/18/18, 11:15 AM
Script to download Coursera(new version) Vide... https://introetkapil.wordpress.com/2016/05/22/s...

i=0;
myLoop();
}

var i = 0;
var a = document.getElementsByClassName('item-name inline-child caption-text')
function myLoop () {
document.getElementsByClassName('item-name inline-child caption-text')[i].click()
setTimeout(function () {
console.log("8 sec over");
var b = document.getElementsByClassName('resource-name body-2-text color-secondary-text')
if (b.length!=0){
b[0].click()
b[1].click()
}
i++;
if (i < a.length) {
myLoop();
}
else{
console.log("Lesson Over");
var b = document.getElementsByClassName('caption-text color-secondary-text');
for(i=0;i<b.length;i++){
if(b[i].innerHTML=="Next Lesson"){
break;
}
}
if(b[i].innerHTML=="Next Lesson"){
b[i].click()
setTimeout(nextLesson , 8000);
}

}
}, 8000)
}
myLoop();

2 of 4 4/18/18, 11:15 AM
Script to download Coursera(new version) Vide... https://introetkapil.wordpress.com/2016/05/22/s...

Advertisements

This entry was posted in Uncategorized and tagged #coursera, #MOOC, #VideoLectures on May 22, 2016
[https://introetkapil.wordpress.com/2016/05/22/script-to-download-courseranew-version-video-lectures-in-one-
go/] .

7 thoughts on “Script to download Coursera(new version) Video Lectures in one go”

HERMES
August 14, 2016 at 9:24 pm

Thanks mate. Good job.

Riya
November 4, 2016 at 5:18 am

Hello. I am having problem with the inspect element thing. When I right click and open Inspect (In google
chrome), where do I paste the script? I am getting HTML code for the page on clicking Inspect, and unable to
paste anything there.
Thank you.

3 of 4 4/18/18, 11:15 AM
Script to download Coursera(new version) Vide... https://introetkapil.wordpress.com/2016/05/22/s...

Emilio Ferrero
November 10, 2016 at 10:18 am

Sorry, but I don’t know where to copy the script, could you help me?

Mahesh Reddy Kukunooru


December 9, 2016 at 5:04 pm

Where should I paste the above code after I click the inspect element..It is not working for me

thinkfreed0m
December 26, 2016 at 6:59 pm

i opened the element section but was unable to paste the code

whiteapostle
December 31, 2016 at 4:04 pm

in the inspect element page , their are code already written their which cannot be deleted , so how do i paste
your code in their?

Mario
October 27, 2017 at 10:03 pm

Genius! Thank you. To those struggling with the pasting: on the bottom half of the ‘console’ window that should
appear, you can paste on the bottom line there you’ll see a �ashing cursor line as if it were a text �le.

4 of 4 4/18/18, 11:15 AM

You might also like