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

I am not able to output to file using pjscrape #53

Open
jackygrahamez opened this issue Sep 6, 2014 · 1 comment
Open

I am not able to output to file using pjscrape #53

jackygrahamez opened this issue Sep 6, 2014 · 1 comment

Comments

@jackygrahamez
Copy link

I am trying to scrape the entire page and save it into a JSON file using PJScrape The following code runs and I can see the entire DOM in standard output, but I don't see the file scrape_output.json in the current directory

pjs.addSuite({
    // single URL or array
    url: 'http://en.wikipedia.org/wiki/List_of_towns_in_Vermont',
    // single function or array, evaluated in the client
    scraper: function() {
        return $(document).text();
    },

    // options: 'json' or 'csv'
    format: 'json',
    // options: 'stdout' or 'file' (set in config.outFile)
    writer: 'file',
    outFile: 'scrape_output.json'
});
@OnkelTem
Copy link

Exactly the same.
This page http://nrabinowitz.github.io/pjscrape/#quickstart references certain "Save to File plugin", but the link is broken.

UPDATE. I was wrong. Writing is just fine, I mistyped writer name in pjs.config().

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

2 participants