pevers / images-scraper

Simple and fast scraper for Google
ISC License
224 stars 69 forks source link

Add a filter for nsfw words #78

Closed imranbarbhuiya closed 2 years ago

imranbarbhuiya commented 2 years ago

Add a filter for nsfw words. Also if it is safe mode then please give an example that where should i use the options.

pevers commented 2 years ago

Hey @imranbarbhuiya , you can use the 'safe' option in the constructor.

const google = new Scraper({
  puppeteer: {
    safe: true
  },
});
imranbarbhuiya commented 2 years ago

Ty got it

imranbarbhuiya commented 2 years ago

hey what this option does? i tought it will filter nsfw images but it isn't doing that.

imranbarbhuiya commented 2 years ago

I've tried like this but it isn't working. var Scraper = require("images-scraper"); const google = new Scraper({ puppeteer: { safe: true, headless: true, }, });

MarceloBrazolim commented 2 years ago

hey what this option does? i tought it will filter nsfw images but it isn't doing that.

this option uses the safe search feature from google, it's the same as turning it on on your browser. the google safe search feature tries to filter off contents that google understands as NSFW with an artificial intelligence, so it may not be 100% safe after all.