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?