-
-
Save dima1034/979e757d7f5dafb3e957dee49f565bbd to your computer and use it in GitHub Desktop.
Pluralsight Video Download
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Login to pluralsight in chrome and Open a course you want to download | |
//Example - https://app.pluralsight.com/library/courses/aws-automating-cloudformation/table-of-contents | |
//Click on "Start" or "Resume Course" Button | |
//chapter listing | |
var list = document.getElementsByTagName("section"); | |
var counter=0; | |
for (var i=0; i<list.length; i++) { | |
if ( list[i].className.match(/\bmodule\b/) ) { | |
var header_text = list[i].getElementsByTagName("h2")[0].innerText; | |
var ul = list[i].getElementsByClassName('clips'); | |
var li_list = ul[0].getElementsByClassName('title'); | |
if ( li_list.length > 0 ) { | |
console.log("------" + header_text + "------"); | |
for (var y=0; y<li_list.length; y++) { | |
counter += 1; | |
console.log(counter + " - " + li_list[y].innerText); // chapter listing | |
} | |
console.log(" "); | |
console.log(" "); | |
} | |
} | |
} | |
// function to down load video | |
function downloadVideo(uri, name) { | |
var link = document.createElement("a"); | |
link.download = name; | |
link.href = uri; | |
link.click(); | |
} | |
//RUN above in chrome "console" | |
// Download current playing video | |
downloadVideo(document.getElementsByTagName('video')[0].src, "overview.mp4") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment