3 releases

0.2.2 Jan 23, 2020
0.2.1 Jan 2, 2020
0.2.0 Dec 30, 2019

#56 in #scraping

Custom license

17KB
234 lines

crab

crates.io

crab is command line web scraping tool written in rust

features

  • supporting css selectors
  • showing content of tags or attributes value
  • showing DOM structure in tree like form
  • support HTTP/POST

planed features

  • support for json

how to install crab

  • with crates.io:
cargo install crab
  • from sources
cargo install --path /path/to/crab/repo/
  • or just download zip or tar.gz from releases section

how to use

  • print DOM's tree
$ crab <url>
  • print DOM's tree of specific tags
$ crab <url> get <css-selector>
  • extra options:
-n, --no-colors                show DOM without colors
-r, --row                      print row content of tag
-a, --attribute <ATTRIBUTE>    which html attribute.
-l, --limit <LIMIT>            how meny result.

Dependencies

~31MB
~533K SLoC