Skip to content

Instantly share code, notes, and snippets.

@Raymans
Raymans / getImages.js
Last active May 28, 2018 02:53 — forked from tobek/get-image-urls.js
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;

if gyp error happened, try below steps to fix the problem.

install Node.js 9.11.2, if not working then:

  1. firstly make sure nvm-windows version, 1.1.0 is not supported to retrieve node version list which new version nvm-windows will get from node offical. So upgrade firstly and see work or not (from 1.1.0 to 1.16 for me)

  2. npm install node-gyp(https://github.com/nodejs/node-gyp#installation)

  3. install windows-build-tools npm install --global --production windows-build-tools