matthewmueller / x-ray

The next web scraper. See through the <html> noise.
MIT License
5.87k stars 349 forks source link

`x(...).paginate(...).then is not a function` in Meteor-context #275

Closed thebarty closed 5 years ago

thebarty commented 6 years ago

Hi guys,

I am trying to get this working with meteor.

When using then() I am getting a x(...).paginate(...).then is not a function-error. This is the code:

const Xray = require('x-ray')
const x = Xray()

x('https://www.source.com', '.teilnehmer', [{
  url: '.website .link@href'
}])
.paginate('a@href')
.then(function (res) {
  console.log(res[0]) // prints first result
})

Any ideas?

iamanam commented 6 years ago

i am having the same problem.

eldyvoon commented 6 years ago

same here, somehow it breaks, it used to work.

asaldivar commented 6 years ago

https://github.com/matthewmueller/x-ray/issues/278#issuecomment-348391227

Installing the package with the repo clone URI worked for me:

npm uninstall -S x-ray then npm i -S https://github.com/matthewmueller/x-ray.git

lathropd commented 5 years ago

Closing this.