thibauts / node-google-search-scraper

Google search scraper with captcha solving support
MIT License
89 stars 40 forks source link

How would you combing all the URLs in a single array? #17

Open ackoi opened 5 years ago

ackoi commented 5 years ago

I know it's a bit of a newbie question, but I really couldn't wrap my head around it.

wilksy commented 5 years ago

clone the code. Look for the 'for' loop containing the callback and replace with a single callback containing the results.

newResults.forEach(function(result) {
  **callback(null, result['url'], result);**
});