This repository is discontinued and replaced by https://github.com/danieldotnl/ha-multiscrape. The new repository is part of the default HACS store. Please switch!
This Home Assistant custom component can scrape multiple fields (using CSS selectors) from a single HTTP request (the existing scrape sensor can scrape a single field only). The scraped data becomes available in separate sensors.
It is based on both the existing Rest sensor and the Scrape sensor. Most properties of the Rest and Scrape sensor apply.
Via HACS as a custom repository (https://github.com/danieldotnl/hass-multiscrape) or install manually by copying the files in a new 'custom_components/multiscrape' directory.
- platform: multiscrape
name: home assistant scraper
resource: https://www.home-assistant.io
scan_interval: 30
selectors:
version:
name: Current version
select: '.current-version > h1:nth-child(1)'
value_template: '{{ (value.split(":")[1]) }}'
releasedate:
name: Release date
select: '.release-date'