Skip to content

Instantly share code, notes, and snippets.

@trgraglia
Forked from tobek/get-image-urls.js
Created February 24, 2016 16:50
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 trgraglia/53f8b3fb3af7286c4f4d to your computer and use it in GitHub Desktop.
Save trgraglia/53f8b3fb3af7286c4f4d to your computer and use it in GitHub Desktop.
Save images from chrome inspector network tab
/* right click on an entry in the network log, select Copy All as Har
* type in console: x = [paste]
* paste the following JS code into the console
* copy the output, paste into a file
* then wget -i [that file]
*/
(function(logObj, mime) {
var results = [];
logObj.log.entries.forEach(function (entry) {
if (mime && entry.response.content.mimeType !== mime) return;
results.push(entry.request.url);
});
console.log(results.join('\n'));
})(x, 'image/jpeg');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment