cheerio-cli

0.3.0 • Public • Published

cheerio-cli

NPM Version

cheerio in command line

installation

$ npm install cheerio-cli -g

Example

simple query 
$ curl -s https://github.com/mlwmlw/cheerio-cli | cheerio -o text "span[itemprop=author]"
mlwmlw

first element
$ curl -s https://github.com/mlwmlw/cheerio-cli/commits/master | cheerio "a.commit-tease-sha"
07b0406

output query elements size
$ curl -s https://github.com/mlwmlw/cheerio-cli/commits/master | cheerio ".commit" -o size
6

query element attribute
$ curl -s https://github.com/mlwmlw/cheerio-cli/commits/master | cheerio "meta[name=hostname]" -a content
github.com	

piping ouput
$ curl -s https://github.com/mlwmlw/cheerio-cli | cheerio "#readme" | cheerio "h2" -o text

Readme

Keywords

Package Sidebar

Install

npm i cheerio-cli

Weekly Downloads

5

Version

0.3.0

License

MIT

Unpacked Size

2.65 kB

Total Files

3

Last publish

Collaborators

  • mlwmlw