Well hello again!

It's been a while, but I thought it might be worth having a blog again, possibly just for me to brain dump onto, or have a record of how I did something that others might find useful (assuming the various search engines glance this way).

But yeah, it's been a while, let's see how this works out!

JG

Contributing to society

By which I mean, I found an add-on for Home Assistant that shows which bin to put out, and when to put it out. I know to put out the bins on a Wednesday night (or Thursday morning), but I'm forever having to load up the council site to find out which one to put out (sometimes it's obvious as it's the one that's REALLY full), but it didn't include Bradford council.

Thankfully it's on GitHub so I was able to pull the code, find a similar council and write a scraper for it. It's currently being reviewed, and looks like it'll be in the next release, and I've learnt a bit of Python which is nice to add to the list of things I've tinkered with.

I will however say that the CRM that the council uses to create it's pages is an abomination. Took me forever with a few tabs open with the pages, inspectors and page sources to find the bits I needed. It's a horrible rats nest of DIVs and heavily nested tables, so much so that what looks like a single inconspicuous table for 'your next bin day' is about 9 TABLE elements deep, each with it's own CLASS, even though the layout and content (aside from Recycling / Household waste) are the same, the green/grey bin classes are different. There are better ways to do things, especially when trying to scrape a site to get a simple bit of information!