Created
February 4, 2023 17:53
-
-
Save ressl/2f1d8ba652f52c4f716f5560c0c01750 to your computer and use it in GitHub Desktop.
Yamaha Music School Download Video and Music offline
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
//video | |
// enable video download | |
$('video').removeAttr('controlsList'); | |
var videofiles = document.getElementsByTagName('video'); | |
var videotext = document.getElementsByClassName('icon'); | |
var srcList = []; | |
var i = 0; | |
setInterval(function(){ | |
srcList.push(videofiles[i].src); | |
var link = document.createElement("a"); | |
link.id=i; | |
link.download = `${videotext[i].innerText.replace(/['"]+/g, '')}.mp4`; | |
link.href = videofiles[i].src; | |
console.log(link); | |
link.click(); | |
i++; | |
},1500); | |
//music | |
var audiofiles = document.getElementsByTagName('audio'); | |
var audiotext = document.getElementsByClassName('icon'); | |
var srcList = []; | |
var i = 0; | |
setInterval(function(){ | |
srcList.push(audiofiles[i].currentSrc); | |
var link = document.createElement("a"); | |
link.id=i; | |
link.download = `${audiotext[i].innerText.replace(/['"]+/g, '')}.mp3`; | |
link.href = audiofiles[i].currentSrc; | |
console.log(link); | |
link.click(); | |
i++; | |
},1500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment