Back to skills
extension
Category: Data & AnalyticsNo API key required

htmlq 命令行 HTML 内容提取器,支持 CSS 选择器

htmlq 是一个命令行工具,使用 CSS 选择器从 HTML 中提取内容,相当于 jq 的 HTML 版本。该工具用 Rust 编写,允许你通过 CSS 选择器将 HTML 管道化,直接从终端提取文本、属性和结构化内容。

personAuthor: user_3c6cb52ehubcommunity

htmlq 命令行 HTML 内容提取器,支持 CSS 选择器

htmlq is a command-line tool for extracting content from HTML using CSS selectors, functioning as the HTML equivalent of jq. Written in Rust, it lets you pipe HTML through CSS selectors to extract text, attributes, and structured content directly from the terminal.

Prerequisites

Rust (cargo) or Homebrew

Installation

Use the upstream install or setup path that matches your environment:

  • cargo install htmlq
  • brew install htmlq

Requirements and caveats from upstream:

  • Remove a node before output

Basic usage or getting-started notes:

  • Cargo

  • sh

  • FreeBSD pkg

  • Source: https://github.com/1991513ccie-png/skills

  • Extracted from upstream docs: https://raw.githubusercontent.com/mgdm/htmlq/HEAD/README.md

Documentation

  • https://github.com/1991513ccie-png/skills