Skip to content

robertjustjones/cheerio-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Cheerio in command line tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%