Skip to content

Instantly share code, notes, and snippets.

@brenogcota
Created June 9, 2021 21:49
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 brenogcota/f7687382cc24f5a1e9be8a4fd25b146e to your computer and use it in GitHub Desktop.
Save brenogcota/f7687382cc24f5a1e9be8a4fd25b146e to your computer and use it in GitHub Desktop.
Download Pirple Courses - Wistia CDN
// step one:
let link = JSON.parse(document.querySelector('.w-json-ld').textContent)["@id"];
console.log('link: ', link)
window.open(link, '_target=blank');
// step two:
let link = document.querySelectorAll('script')[4].getInnerHTML().split('https://')[1].split('.bin')[0];
window.location.href = 'https://'+link+'.mp4';
// step three:
let link = window.location.href;
let a = document.createElement('a');
a.href = link;
a.download = 'lesson-'+ Date.now() + '-' + link.split('://')[1];
a.innerHTML = 'click me'
document.body.appendChild(a);
a.click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment