Not getting anything back? #138

Closed
opened 2025-10-14 18:14:53 -06:00 by navan · 0 comments
Owner

Originally created by @DilionsCode on 7/20/2017

I'm trying to get #fl-carousel > div > ul > li from HomeFirstRealtors

it's the carousel on the page with houses listed that I'm trying to get

I wrote this back in the past but I never understood ever why it's not returning something, originally it worked fine now it doesn't add anything to results.json it just returns []

I'm using the newest version of x-ray and experimented with older versions and nothing changed.

Here's the code

var Xray = require('x-ray');
var x = Xray();

x('https://homesforsale.century21.com/century-21-home-first-realtors-6309c', '#fl-carousel > div > ul > li', [{
  img: 'div > div:nth-child(1) > a > img@src',
  url: 'div > div:nth-child(1) > a@href',
  ad1: '#address1',
  ad2: '#address2',
  price: '#price',
  bed: '#beds',
  bath: '#baths',
  sqft: '#sqft_price',
}])
.write('results.json')
*Originally created by @DilionsCode on 7/20/2017* I'm trying to get `#fl-carousel > div > ul > li` from [HomeFirstRealtors](https://homesforsale.century21.com/century-21-home-first-realtors-6309c) it's the carousel on the page with houses listed that I'm trying to get I wrote this back in the past but I never understood ever why it's not returning something, originally it worked fine now it doesn't add anything to `results.json` it just returns `[]` I'm using the newest version of x-ray and experimented with older versions and nothing changed. Here's the code ``` var Xray = require('x-ray'); var x = Xray(); x('https://homesforsale.century21.com/century-21-home-first-realtors-6309c', '#fl-carousel > div > ul > li', [{ img: 'div > div:nth-child(1) > a > img@src', url: 'div > div:nth-child(1) > a@href', ad1: '#address1', ad2: '#address2', price: '#price', bed: '#beds', bath: '#baths', sqft: '#sqft_price', }]) .write('results.json') ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/x-ray#138
No description provided.