Skip to content

Instantly share code, notes, and snippets.

@ogun
Forked from tobek/get-image-urls.js
Created May 15, 2018 13:57
Show Gist options
  • Save ogun/88e15a7416571ed21535dbf9a60f2159 to your computer and use it in GitHub Desktop.
Save ogun/88e15a7416571ed21535dbf9a60f2159 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