robbrad / UKBinCollectionData

UK Council Bin Collection Data Parser Outputting Bin Data as a JSON
MIT License
105 stars 73 forks source link

Newport has upgraded #706

Open ChrisMash opened 2 months ago

ChrisMash commented 2 months ago

Name of Council

NewportCityCountil

Issue Information

This is more of a heads up as the current solution probably still works (not actually used this repo but have been doing similar work on an iOS app).

Newport was using iweb.touchvision but has upgraded to iportal.touchvision now, which is entirely different 🥳. The iweb.touchvision page still works fine, for now, I imagine it might get shutdown at some point, once they're happy the new version is stable.

I've managed to update my iOS solution so that it crawls the webpage interactively, inserting the postcode and selecting the address with the rendered HTML as the new version of the page doesn't immediately have the correct HTML elements, it's all driven by client-side JS setting things up.

My solution is to load the page in a webview and observe the DOM changing, then interact with it to enter the postcode (when the field is present), select an address (when the list is present) and then finally read out the HTML once the bin collection details were rendered. I imagine there's something fancy you can do in Python that's similar.

You may even be doing it already for another council, but thought I'd share what I'd learned! Feel free to close this off at your leisure!

Verification