Skip to content

Instantly share code, notes, and snippets.

@whizkydee
Last active October 10, 2018 23:37
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 whizkydee/5164a5aa0aa77becc5c4c14bccf88868 to your computer and use it in GitHub Desktop.
Save whizkydee/5164a5aa0aa77becc5c4c14bccf88868 to your computer and use it in GitHub Desktop.
openvideo.js - Lone Instagram video extractor.
// openvideo.js - Lone Instagram video extractor.
const openVideo = (() => {
location.hostname === 'www.instagram.com'
&& location.pathname.includes('/p/') ? (
Promise.resolve(document.querySelector('._7thjo').click())
.then(() =>
window.location = document.querySelector('video').src
).catch(() => window.alert('We need a refactor, maybe ;)'))
) : window.alert('Oops. You\'re prolly not on the right page.')
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment