Skip to content

Instantly share code, notes, and snippets.

@NoahBres
Created January 8, 2021 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NoahBres/ddfcee893ae38356cbf0feb8a44b1904 to your computer and use it in GitHub Desktop.
Save NoahBres/ddfcee893ae38356cbf0feb8a44b1904 to your computer and use it in GitHub Desktop.
function download(url, filename) {
const a = document.createElement('a');
a.style.diplay = 'none';
document.body.appendChild(a);
a.href = url;
a.download = "playlist8.ts";
a.click();
// a.remove();
}
const startVideoIndex = 0;
const endVideoIndex = 336;
for(let i = startVideoIndex; i <= endVideoIndex; i++) {
const url = `https://hls.studyedge.com/studyedge/02biochemistry/UF/OMCR/Spring_2021/Spring_2021_UF_BCH4024_Exam_1_Session_0_stitch_v1_jenn_Aligned_Logo.mp4/playlist${i}.ts`
const filename = `playlist${i}.ts`;
setTimeout(() => download(url, filename), i * 100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment