thibauts / node-google-search-scraper

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

Error: getaddrinfo ENOTFOUND www.google.com #2

Closed essaji closed 8 years ago

essaji commented 8 years ago

I am getting this error while trying to execute on node

    if(error) throw error;
                    ^
   Error: getaddrinfo ENOTFOUND www.google.com
   at errnoException (dns.js:44:10)
   at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)

here is my piece of code

var scraper = require('./node_modules/google-search-scraper');
var options = {
query: 'Nodejs',
limit: 10
}
scraper.search(options, function(error,url){
if(error) throw error;
console.log(url);
});
thibauts commented 8 years ago

Looks like your local DNS client can't resolve google ;)

essaji commented 8 years ago

why not? is there any solution? by the way I am behind a proxy which I have already set in environment variables. Do I need to set proxy somewhere else as well? I appreciate your help.