pevers / images-scraper

Simple and fast scraper for Google
ISC License
225 stars 70 forks source link

I think you're calling the function twice here. Could it be? #109

Closed Pnlvfx closed 8 months ago

Pnlvfx commented 1 year ago

if (Array.isArray(searchQuery)) { const promises = searchQuery.map(async (query) => { const images = await this._scrapePage(query, limit); return { query, images }; }); results = await Promise.all(promises); } else { results = await this._scrapePage(searchQuery, limit); }

await this._scrapePage(searchQuery, limit);
pevers commented 8 months ago

_scrapePage

Seems like it! Thanks for the catch, this makes things faster.