Skip to content

Instantly share code, notes, and snippets.

@smj10j
Created January 27, 2017 08:06
Show Gist options
  • Save smj10j/2eb0457d2c15498f107e53db05af9ae2 to your computer and use it in GitHub Desktop.
Save smj10j/2eb0457d2c15498f107e53db05af9ae2 to your computer and use it in GitHub Desktop.
Download all photos from an Instagram page using the Google Chrome dev console
// Download all photos from an Instagram page
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();
$('img').each(function(i, el) {
$("body").append($("<a id='xyz'/>"));
$('#xyz').attr("download", el.src);
$('#xyz').attr("href", el.src);
$('#xyz')[0].click();
console.log(el.src);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment