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

How to keep the result in a variable? #57

Open
vallieres opened this issue Nov 11, 2014 · 0 comments
Open

How to keep the result in a variable? #57

vallieres opened this issue Nov 11, 2014 · 0 comments

Comments

@vallieres
Copy link

Hello,

I would like to keep the result in a variable for subsequent manipulation. In JS terms, is there a complete event I can attach a function to?

Similar to:

pjs.addSuite({
    url: urlCPB,
    moreUrls: '#recherche > table > tbody > tr > td.torrent-aff > a',
    maxDepth: 1,
    scraper: function() {
        return {
            name: $('#center-middle > div.content > div.torrent > h1').text(),
            fileSize: $('#center-middle > div.content > div.torrent > div:nth-child(6) > fieldset > strong:nth-child(2)').text(),
            torrent: $('#center-middle > div.content > div.torrent > div:nth-child(8) > div:nth-child(2) > a').attr('href')
        };
    },
    complete: function(data){
        console.log('This is the final data object being scrapped: ' + data);
    }
});
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