lai:meteor-xray

v1.0.5Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Meteor X-Ray Scraper

Meteor wrapper for the NPM x-ray web scraper.

Installation

meteor add lai:meteor-xray

Usage

To use the xray variable has been exposed globally on the server.

Go here for usage instructions.

If you need blocking functionality, use the Future library, which Meteor already installs by default, like this:

1// The future library is loadable already
2var future = new (Npm.require('fibers/future'))();
3
4xray('http://google.com')
5  .select('title')
6  .run(function (err, title) {
7    if (!err) {
8      future.return(title);
9    } else {
10      future.throw(err);
11    }
12  });
13
14// Google's title will get stored
15var title = future.wait();

Future

Add a synchronous wrapper around it to do blocking calls.

License

MIT