Permalink
Browse files

Updated the high level scrape method

  • Loading branch information...
1 parent cc25cd6 commit 82e4c41f74e584ebaacb5a22c779957fa8e6be6e @chriso chriso committed Mar 7, 2011
Showing with 8 additions and 12 deletions.
  1. +7 −11 lib/node.io/index.js
  2. +1 −1 package.json
View
@@ -29,14 +29,10 @@ exports.scrape = function(input, run, output) {
run = input;
input = false;
}
- output = output || false;
- var nodeiojob = job.Job;
- var scrape_job = new nodeiojob({
- timeout: 10
- },{
- input: input,
- run: run,
- output: output
- });
- processor.start(scrape_job);
-};
+ var methods = {input:input, run:run},
+ options = {timeout:10, auto_retry:true};
+ if (typeof output !== 'undefined') {
+ methods.output = output;
+ }
+ processor.start(new exports.Job(options, methods));
+};
View
@@ -1,6 +1,6 @@
{ "name" : "node.io",
"description" : "A distributed data scraping and processing framework",
- "version" : "0.2.4-3",
+ "version" : "0.2.4-4",
"homepage" : "http://github.com/chriso/node.io",
"keywords" : ["data","mapreduce","map","reduce","scraping","html","parsing","parse","scrape","process","processing","data"],
"author" : "Chris O'Hara <cohara87@gmail.com>",

0 comments on commit 82e4c41

Please sign in to comment.