images-scraper icon indicating copy to clipboard operation
images-scraper copied to clipboard

Scrape mehod always returns empty array

Open alperenbaskaya58 opened this issue 10 months ago • 12 comments

I was using this package to grab image links. Even the sample code is not working returns empty array. What could be the problem?

var Scraper = require('images-scraper');

const google = new Scraper({
  puppeteer: {
    headless: false,
  },
  //safe : false,
  //userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)', // the user agent

});

(async () => {
    
  const results = await google.scrape('banana', 5);
  console.log('results', results);
})();

alperenbaskaya58 avatar Apr 07 '24 19:04 alperenbaskaya58