pevers / images-scraper

Simple and fast scraper for Google
ISC License
228 stars 71 forks source link

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

Closed Pnlvfx closed 10 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 10 months ago

_scrapePage

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