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

Direct Child after body #205

Open
h3nn3 opened this issue Aug 10, 2016 · 0 comments
Open

Direct Child after body #205

h3nn3 opened this issue Aug 10, 2016 · 0 comments

Comments

@h3nn3
Copy link

h3nn3 commented Aug 10, 2016

Can not select direct child after body

When i try to select direct DIVs after the body it does not work.

Example:

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

var xray = new Xray();

xray("https://www.stadt-hof.org/immo_neu/tabelle_miete.php3?such_ang=a&sort=datum", 'html > body > div:not(:first-of-type)', 
    [{
        type: 'div:nth-child(5) > table tr:nth-child(1) td:nth-child(2)',
        renter: {
            renterCompany: 'div:nth-child(5) > table tr:nth-child(1) td:nth-child(3)',
            renterName : 'div:nth-child(5) > table tr:nth-child(2) td:nth-child(3)',
            renterAdress: 'div:nth-child(5) > table tr:nth-child(3) td:nth-child(3)',
            renterAdress2: 'div:nth-child(5) > table tr:nth-child(4) td:nth-child(3)',
            renterPhone: 'div:nth-child(5) > table tr:nth-child(5) td:nth-child(3)',
            renterFax: 'div:nth-child(5) > table tr:nth-child(6) td:nth-child(3)',
            renterEmail: 'div:nth-child(5) > table tr:nth-child(7) td:nth-child(3)'
        },
        adress: 'div:nth-child(5) > table tr:nth-child(2) td:nth-child(2)',
        livingSpace: 'div:nth-child(5) > table tr:nth-child(3) td:nth-child(2)',
        rooms: 'div:nth-child(5) > table tr:nth-child(4) td:nth-child(2)',
        floor: 'div:nth-child(5) > table tr:nth-child(5) td:nth-child(2)',
        leaseCost: 'div:nth-child(5) > table tr:nth-child(6) td:nth-child(2)',
        utilites: 'div:nth-child(5) > table tr:nth-child(7) td:nth-child(2)',

    }]
)
    .write("asd.json");
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

1 participant