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

jsdom.env is not defined #366

Open
raphaelsoul opened this issue Nov 13, 2020 · 1 comment
Open

jsdom.env is not defined #366

raphaelsoul opened this issue Nov 13, 2020 · 1 comment

Comments

@raphaelsoul
Copy link

jsdom.env({

reproduce code

var jsdom = require('jsdom');
var Crawler = require('crawler');

var c = new Crawler({ jQuery: jsdom, jquery: jsdom });

c.queue({
  jQuery: {
    jsdom
  },
  uri: "https://www.baidu.com",
  callback: (err, res, done) => {
    console.log(err, res, done)
  }
})

This leads to
image

By the way the statement about jsdom seems to be outdated. pass { jQuery: require('jsdom') } not works

@mike442144
Copy link
Collaborator

You are right, the jsdom option is outdated. I recommend you to adopt puppeteer to get what you want instead.

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

2 participants