Skip to content

Instantly share code, notes, and snippets.

@Desolace
Forked from tobek/get-image-urls.js
Created December 10, 2016 09:04
Show Gist options
  • Save Desolace/f0ac2fc85e9457db10c652d49065bb8e to your computer and use it in GitHub Desktop.
Save Desolace/f0ac2fc85e9457db10c652d49065bb8e 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