Thanks never though of that, I do similar to this and noticed I get a refused response sometimes so I have now scraped all the data I need in one go and parsed it it HA. I think once daily should be OK. My council have a habit of changing around a bit
No probs, might not work with yours as your data is different but I just went back in the tree and removed the last 2 branches, div:nth-of-type(3) > div:nth-of-type(1) this gave me all the bins and all the dates like this:
ADDRESS REMOVED
Tue, 11 June 2019
Tue, 18 June 2019
Thu, 13 June 2019
Open Calendar
OLD - individual bin
- platform: scrape
resource: https://binscollections.eastriding.gov.uk/Output/Results?searchString=XXXX+XXXt&ButtonSearchTrial=Search
select: ".er-bin-item-row-wrapper > div:nth-of-type(77) > div:nth-of-type(1) > div:nth-of-type(3) > div:nth-of-type(1)"
name: EYRC Next Green Bin
scan_interval: 3600
Then use these sensors and split them into individual bins:
green_bin_next:
friendly_name: "EYRC Next Green Bin"
value_template: "{{ states.sensor.eyrc_next_bins.state.split('\n')[13] }}"
blue_bin_next:
friendly_name: "EYRC Next Blue Bin"
value_template: "{{ states.sensor.eyrc_next_bins.state.split('\n')[20] }}"
brown_bin_next:
friendly_name: "EYRC Next Brown Bin"
value_template: "{{ states.sensor.eyrc_next_bins.state.split('\n')[27] }}"
hey there waste managers i’m struggling to get my local authoritys’ system to scrape. it doesn’t seem to work like any of the other examples in this thread. can anyone spot the right way?
I’ve had a look and it doesn’t show next bin, just the calendar. It is probably possible to scrape the whole month and then use HA to work out which is the next bins.
My council (Ealing, UK) offers no ical, REST API or even an easily scrapable website (it creates a PDF).
So I used the google calendar approach here:
I created a new calendar for refuse collection and added repeating events for refuse, recycling, garden and food waste collection (either weekly or every 2 weeks). I will manually alter the events for seasonal changes such as Xmas as/when my council publishes their schedule (normally a few weeks before).
Since I already use node-red I pretty much reused the flow that is shared in the reddit post.
Could someone help me with a scrap i am still learning this and getting a bit stuck.
I used node red and http request h3 and i get the following just not able to get the dates.
I am on ubuntu 18.04 server and have Node Red running successfully.
Does anyone know how to install PUP as it wont let us install from sudo apt-get install pup ?
I live in Wakefield and seen 1 user on here also uses it from the council website too but if some one would give me guidance, that would be appreciated.
Wow what a wealth of information here. Ive managed to get so far but not been able to extract any useful information yet on dates etc. Was wondering if someone could help point me in the right direction.