hubcap meta

Get all meta tags from the current page.

When to use

Use meta to retrieve every <meta> tag on the page, including name, property, content, charset, and http-equiv attributes. Use info for a combined overview that includes some meta information alongside title and URL.

Usage

hubcap meta

Arguments

None.

Flags

None.

Output

FieldTypeDescription
tagsarrayArray of meta tag objects
tags[].namestringThe name attribute value
tags[].propertystringThe property attribute value (Open Graph, etc.)
tags[].contentstringThe content attribute value
tags[].charsetstringThe charset attribute value
tags[].httpEquivstringThe http-equiv attribute value
{
  "tags": [
    {
      "name": "description",
      "content": "An example page for testing."
    },
    {
      "property": "og:title",
      "content": "Example Domain"
    }
  ]
}

Errors

ConditionExit codeStderr
Chrome not connected2error: connecting to Chrome: ...
Timeout3error: timeout

Examples

Get all meta tags:

hubcap meta

Extract the description meta tag:

hubcap meta | jq -r '.tags[] | select(.name=="description") | .content'

Audit Open Graph tags by chaining with jq:

hubcap goto "https://example.com" && hubcap meta | jq '[.tags[] | select(.property | startswith("og:"))]'

See also

  • info - get combined page information including meta
  • links - extract all links from the page
  • source - get the full HTML source