npm.io
5.2.0 • Published 6d agoCLI

@localnerve/get-attribute

Licence
MIT
Version
5.2.0
Deps
3
Size
8 kB
Vulns
0
Weekly
375

get-attribute

A command to get a single attribute or property from a webpage, echo to stdout

npm version Verify Coverage Status

See repo releases for change notes

Example

Grab the full url from a specific anchor tag of interest (all options shown):

get-attribute --url=https://host.com/path --selector='a[href^="/videos"]' --attribute=href --useprop=true --timeout=5000 --launchargs='{"headless":true}'

# echoes the first matching href with full url from property: 'https://host.com/path/videos/123456789'

License

MIT

Keywords