Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diogoazevedos/x-ray-build
A helper that build a x-ray based on a schema
https://github.com/diogoazevedos/x-ray-build
crawler schema scraper structure x-ray
Last synced: 6 days ago
JSON representation
A helper that build a x-ray based on a schema
- Host: GitHub
- URL: https://github.com/diogoazevedos/x-ray-build
- Owner: diogoazevedos
- License: mit
- Created: 2017-06-09T17:55:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-23T18:35:24.000Z (over 6 years ago)
- Last Synced: 2024-12-08T09:35:57.931Z (29 days ago)
- Topics: crawler, schema, scraper, structure, x-ray
- Language: JavaScript
- Size: 8.79 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# x-ray-build
[![Build Status](https://travis-ci.org/diogoazevedos/x-ray-build.svg?branch=master)](https://travis-ci.org/diogoazevedos/x-ray-build)
[![Coverage Status](https://coveralls.io/repos/github/diogoazevedos/x-ray-build/badge.svg)](https://coveralls.io/github/diogoazevedos/x-ray-build)A helper that build a [x-ray](https://github.com/lapwinglabs/x-ray) based on a schema.
### Getting started
```sh
npm install x-ray-build
``````js
const x = require('x-ray');
const build = require('x-ray-build');const drive = x();
const crawl = build(drive, {
$source: 'https://github.com/diogoazevedos',
$context: '[itemscope]',
$selector: {
name: '.vcard-fullname',
repos: {
$context: '.source',
$selector: [{
name: '.repo',
}],
},
},
});crawl((e, content) => console.log(content));
```