Closed joshnewman17 closed 2 weeks ago
Update - I confirmed searching my objectID on the site is functional, but it looks like they're blocking downloading the data, so if this is how it gets captured it seems like this is likely a change on their side that broke it.
We get the data from https://data.okc.gov/services/portal/api/data/records/Address%20Trash%20Services
but it looks like they now use Incapsula to prevent scraping, so I'm not sure if we can fix this
We get the data from https://data.okc.gov/services/portal/api/data/records/Address%20Trash%20Services
but it looks like they now use Incapsula to prevent scraping, so I'm not sure if we can fix this
I can host a puppeteer server to create a drop in replacement URL that bypasses Incapsula.
If I do this, can it be added to the repo?
Yes this would probably be fine, But it does work again for me, and I do not get an Incapsula message anymore
Yes this would probably be fine, But it does work again for me, and I do not get an Incapsula message anymore
Mine hasn't worked for months. I just assumed it was a "me" thing and didn't troubleshoot further. I was updating my dashboard this week and saw this issue on GitHub and realized it wasn't just me.
Anyway, I made a drop-in replacement for the URL: https://okc.schizo.dev/trash
Just add that line into the code.
I've never made a pull request so I'm not really sure how to do it, to be honest.
Thanks for that. The old one seems to work again, so I would keep this and replace the url if this happens again
Thanks for that.
The old one seems to work again, so I would keep this and replace the url if this happens again
Official API still doesn't work for me, FYI.
May be a regional thing or something, not sure. You could maybe add it as a fallback if the main URL fails.
You're right now I have the problem again, not sure when this triggers but
curl "https://okc.schizo.dev/trash?objectID=1935340"
# returns
{"status":"error","code":502,"message":"Application failed to respond","request_id":"W7Dgxx7_QeqtNh5Uwp2dFg_3500563535"}%
Yeah, I slapped this code together in like 10 minutes. I need to add some error handling. I'll restart the server.
But according to the okc_gov.py the parameter should be recordID, not objectID.
This source now uses the unofficial server by @sanctas
This will be part of the next release or is available now as master (git) version
install master/git: Developer tools -> actions -> select update: Install update
-> click Coose entity
and select WCS -> select version
and type master
in the input field -> run the action -> restart HA
install master with HACS version < 2.0: (3-dot menu -> redownload -> change version to master -> fully restart HA (this will increase update cycle by a lot)
I Have A Problem With:
A specific source
What's Your Problem
Was excited to see my city is supported but unfortunately it looks like it's currently not functioning for me. Attempting initial setup and receiving the error in the attached logs.
Source (if relevant)
okc_gov
Logs
Relevant Configuration
Checklist Source Error
Checklist Sensor Error
Required