browserlane
CLI referenceInspect page

bl attr

Get an HTML attribute value from an element

Get an HTML attribute value from an element

Usage

bl attr [selector] [attribute] [flags]

Global flags

FlagDescription
--headlessHide browser window (visible by default)
--jsonOutput as JSON
-v, --verboseEnable debug logging

Examples

bl attr "a" "href"
# Get the href of the first link

bl attr "img" "src"
# Get the image source URL