Skip to content

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

@pankaj2k9

Description

@pankaj2k9

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);
    });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions