Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/localnerve/get-attribute
https://github.com/localnerve/get-attribute
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/localnerve/get-attribute
- Owner: localnerve
- License: mit
- Created: 2024-04-21T01:06:59.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T11:54:40.000Z (2 months ago)
- Last Synced: 2024-10-29T13:33:08.175Z (2 months ago)
- Language: HTML
- Size: 381 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# get-attribute
> A command to get a single attribute or property from a webpage, echo to stdout
[![npm version](https://badge.fury.io/js/@localnerve%2Fget-attribute.svg)](https://badge.fury.io/js/@localnerve%2Fget-attribute)
![Verify](https://github.com/localnerve/get-attribute/workflows/Verify/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/localnerve/get-attribute/badge.svg?branch=main)](https://coveralls.io/github/localnerve/get-attribute?branch=main)## Example
Grab the full url from a specific anchor tag of interest (all options shown):
```shell
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](LICENSE.md)