parsel
parsel copied to clipboard
[FeatureRequest] Adding the command line interface.
It would be helpful if there may be a command-line interface added for parsel
, as existing tools (e.g. W3's html-xml-tools
and pup
in Golang) are not handy enough.
Expected usage example:
$ curl -s https://scrapy.org/ | parsel --css "div#scrapy-logo + p::text"
An open source and collaborative framework for extracting the data you need from websites.
$ curl -s https://scrapy.org/ | parsel --all --output-json --css "div#scrapy-logo ~ * ::text"
["An open source and collaborative framework for extracting the data you need from websites.", "In a fast, simple, yet extensible way.", "Maintained by", "Scrapinghub", "and", "many other contributors"]
FYI, there are already two CLI implementations:
-
parselcli
: https://github.com/Granitosaurus/parsel-cli -
parsel-cli
: https://github.com/rmax/parsel-cli (seems unmaintained)
And they are covered in the documentation.