nokogiri
ruby HTML/XML parser CLI
TLDR
Parse HTML file
$ nokogiri [file.html]
Fetch and parse URL$ nokogiri [https://example.com]
Parse with CSS selector$ nokogiri [file.html] -e "[doc.css('h1').text]"
Parse XML$ nokogiri [file.xml] --type xml
Interactive mode$ nokogiri [file.html] -i
SYNOPSIS
nokogiri [options] [fileorurl]
DESCRIPTION
nokogiri is a Ruby HTML/XML parser CLI. It provides document parsing and querying.
The tool uses CSS and XPath selectors. Part of the Nokogiri Ruby gem.
PARAMETERS
FILEORURL
HTML/XML file or URL.-e CODE
Execute Ruby code.--type TYPE
Document type (html, xml).-i
Interactive mode (irb).--help
Display help information.
CAVEATS
Requires Ruby. Nokogiri gem must be installed. Ruby syntax for expressions.
HISTORY
Nokogiri is a Ruby gem for parsing HTML/XML, with this CLI wrapper for quick operations.
