Scraping Help for quite a simple scrape

I’m trying my first attempt at some web scraping. There is a gov site for flood gate closures where I live:

I just want to scrape what’s open and what’s closed. Open gates are under an “open” header, and closed under a “closed” header.

I’ve followed a video tutorial, using jsoup to single out the code I want, for example, the 1st “open” entry is “ul:nth-child(4) > li” - and that tests out in jssoup - showing the text, “A361 (Burrowbridge to East Lyng)”

All I’m trying to achieve right now, is pulling that text - but I get the feeling Scrape is expecting a value? I just don’t know hwo to tell it I’m pulling text. When I look at the entity I’ve created it has a state of “unnavailable” which is no suprise as it isn’t a “state”.

Ultimately, I want to be able to distinguish which parts are below the “open” and the “closed” headings, and then use the resulting text to call up a costom GIF which will be a road map. Obv I’m goign to have to use some logic to achieve that, but first I just want to be able to pull teh text. Is it the “value” field in the integration? something like that?

You should start by telling us which integration your using to scrape with and showing us what you’ve tried and where it failed.

Hi - I’m trying to use the built in HA scraper integration

I put in the web site address, and I put in “ul:nth-child(4) > li” in the “Defines what tag to search for. Check Beautifulsoup CSS selectors for details” box. Nothing more.

The created service shows “Sensors”, “Web scrape” - Unavailable

Ya I gave it a go and couldn’t get it to work either and the docs are thin. If you can’t get an answer or a result you might consider giving ha-multiscrape a try, it also has a decent forum support thread and better docs.