matthewmueller / x-ray

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

Inner requests are not resolved when applied on list of items #166

Closed ageorgios closed 8 years ago

ageorgios commented 8 years ago

Subject of the issue

Inner requests are not resolved when applied on list of items

Your environment

node --version = v4.4.0 npm --version = 2.14.20

Steps to reproduce

x('url', 'list', [{
    title: 'selector',
    info: x('a@href', {
      book: 'selector'
    }),
    href: 'a@href'
  }])

Expected behaviour

For each item in the list to return the book from the new request.

Actual behaviour

Returns empty info {}, even thought the inner xray request works when run seperately and a@href has the right value.

from DEBUG=x-ray The function returns before the subrequests return giving an undefined result.

bnjm commented 8 years ago

Seems to be the same as #111, I got nested requests working again by rolling back to 2.0.3

Kikobeats commented 8 years ago

Yes, is the same :_(