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

Crawling multiple URL from a collection #212

Open
chang5CAL opened this issue Sep 21, 2016 · 2 comments
Open

Crawling multiple URL from a collection #212

chang5CAL opened this issue Sep 21, 2016 · 2 comments

Comments

@chang5CAL
Copy link

chang5CAL commented Sep 21, 2016

Subject of the issue

I'm trying to scrape a list in a site that leads to other pages that has the same formatting.

I was able to create a collection of all the a tags, but when I try to visit a collection of pages, the key I try to create with it doesn't get added in my returned object.

Your environment

Node: v6.5.0
NPM: 3.5.3

Steps to reproduce

    var Xray = require('x-ray');
    var x = Xray();
    x('http://stackoverflow.com/', {
        title: x(['a@href'], 'title'),
    }) (function(err, obj) {
        console.log(obj);
    });

Expected behaviour

I expected I would get an object with the title of all the link, something like:
{ title: [title1, title2, title3, etc] }

Actual behaviour

Instead I get {}

@knvpk
Copy link

knvpk commented Oct 10, 2016

for me too, inner href's not working but the example.js in examples folder is working .

x('http://allrecipes.co.in/recipes/recipe-type.aspx','div.hub', [{
type: 'h5 a',
items: x('h5 a@href','title'),
}]).write('results.json')

@smithaitufe
Copy link

@pavankumarkatakam @chang5CAL was this issue ever fixed?

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

3 participants