Convert html stream to json based on a schema of selectors
var select = require('html-select-to-json')
var request = require('request')
request('https://github.com/timhudson/html-select-to-json')
.pipe(select({
title: 'title',
href: {selector: 'link[rel="canonical"]', attribute: 'href'},
readme: '.markdown-body'
}))
.pipe(process.stdout)
usage: html-select-to-json SELECTORS
Convert html stream to json based on a schema of selectors
example: html-select-to-json --title="title" --readme=".markdown-body"
npm install -g html-select-to-json
MIT