Skip to content

Instantly share code, notes, and snippets.

@titusfx
Last active April 8, 2020 15:07
Show Gist options
  • Save titusfx/fade70504506acf70dda134fe54f4aca to your computer and use it in GitHub Desktop.
Save titusfx/fade70504506acf70dda134fe54f4aca to your computer and use it in GitHub Desktop.
How to dowload a video from wistia just with copying and paste this script on the console of your browser
/* This is an automation of this process explained in this video https://www.youtube.com/watch?time_continue=89&v=88eHpwLS_aQ&feature=emb_logo */
let allContent = document.getElementsByTagName('body')[0].innerHTML;
const keyWord = 'wistia_async_';
let asyncTextIndex = allContent.indexOf(keyWord);
let asyncEndIndex = allContent.indexOf(" ", asyncTextIndex);
let codeIndex = asyncTextIndex + keyWord.length;
let codeLength = asyncEndIndex - asyncTextIndex - keyWord.length;
let code = allContent.substr(codeIndex, codeLength);
let fastUrl = `https://fast.wistia.net/embed/iframe/${code}`
let finalUrl = `https://getvideo.at/?url=${encodeURIComponent(fastUrl)}&utm_source=bookmarklet&utm_medium=redirect`;
window.open(finalUrl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment