sjmulder / htmlpath

Command-line utility to perform XPath queries on HTML or XML documents.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

htmlpath

Command-line utility to perform XPath queries on HTML or XML documents.

Example

$ htmlpath somefile.html //a/@href
http://foo.example.com

Usage

usage: htmlpath [-h] [file] expression

positional arguments:
  file        an HTML or XML file (defaults to stdin)
  expression  an XPath expression

optional arguments:
  -h, --help  show this help message and exit

Optional installation:

ln -s /path/to/htmlpath.py /usr/bin/htmlpath 

Dependencies

  • Python 2.7 (other versions may work, too)
  • Scrapy to do the parsing

About

Command-line utility to perform XPath queries on HTML or XML documents.

License:Other


Languages

Language:Python 100.0%