1.2.2390.7 MB
unset
strict
core20
jq, but for HTML
Snap-specific notes
This snap is NOT an official distribution of hq, please refer to the
snap's own issue tracker for support: https://github.com/brlin-tw/orf-hq-snap/issues
You can run the following command to expose the native
to your shell:
Upstream project description
of CSS selectors. The selectors are expressed in a similar way to
JSON, but where the values are CSS selectors. For example:
This will select all
(
element it will select the text of the
the
The end result is the following structure:
This snap is NOT an official distribution of hq, please refer to the
snap's own issue tracker for support: https://github.com/brlin-tw/orf-hq-snap/issues
You can run the following command to expose the native
hq commandto your shell:
snap alias orf-hq.hq hqUpstream project description
hq reads HTML and converts it into a JSON object based on a seriesof CSS selectors. The selectors are expressed in a similar way to
JSON, but where the values are CSS selectors. For example:
{posts: .athing | [ {title: .titleline > a, url: .titleline > a | @(href)} ] }This will select all
.athing elements, and it will create an array(
| [{...}]) of objects for each element selected. Then for eachelement it will select the text of the
titleline > a element, andthe
href attribute (| @(href)).The end result is the following structure:
{
"posts": [
{
"title": "...",
"url": "..."
}
]
}
Update History
1.2.2 (39)13 Dec 2025, 09:47 UTC
2 Nov 2023, 18:38 UTC
16 Oct 2024, 18:48 UTC
13 Dec 2025, 09:47 UTC