3 releases

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

#40 in #scraping

Download history 1/week @ 2024-02-20 1/week @ 2024-02-27 6/week @ 2024-03-26 60/week @ 2024-04-02

66 downloads per month

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

~19–28MB
~471K SLoC