Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: getaddrinfo ENOTFOUND www.google.comundefined www.google.comundefined:443 #14

Open
pankaj2k9 opened this issue Nov 29, 2018 · 2 comments

Comments

@pankaj2k9
Copy link

pankaj2k9 commented Nov 29, 2018

Hi,

I am getting following issue :


{ Error: getaddrinfo ENOTFOUND www.google.comundefined www.google.comundefined:443
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'www.google.comundefined',
  host: 'www.google.comundefined',
  port: 443 }
/Users/pankaj/work/genderapp/index.js:27

And here is my code:

const csvFilePath = './names_score_alltime.csv';
const csv = require('csvtojson');
const scraper = require('google-search-scraper');
const DeathByCaptcha = require('deathbycaptcha');

const dbc = new DeathByCaptcha('pankaj2k9', '...mypassord....');
let names = [];
csv()
    .fromFile(csvFilePath)
    .then((jsonObj) => {
        jsonObj.forEach((singleScore) => {
            names.push(singleScore.first);
        })
    })



let options = {
    query: 'information theory',
    age: 'y',
    solver: dbc
};

let urls = [];
scraper.search(options, (err, url) => {
    console.log(err);
    if (err) throw err;
    urls.push(url);
    Promise.all(urls).then((values) => {
        console.log(values);
    });
});

@rajathans
Copy link

Did you find any solution for this?

@SlehMas
Copy link

SlehMas commented Feb 18, 2019

This exception occurs when you query too many times in a small time span.
Change your IP address or wait for an hour or two and try again.

PS: Too many times and your IP gets blacklisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants