pydukeenergy
pydukeenergy copied to clipboard
Made some changes to get most of it somewhat functional.
Created option to bypass SSL verification. Changed construction to have user manually input the meter numbers, bypassing the need to scrape the website, which contains javascript python is unable to interpret. Was able to get most functions working, but I was still getting an error status when trying to use the get_usage_chart_data method. Additionally, I changed the constructor for the meter class to clean up what I didn't think was necessary, including the meter start date. However, I may have made a mistake and misunderstood exactly what the start date was, so you will want to review that change.
I finally got around to testing this out. It still isn't working for me. The SSL errors are gone, but I don't get any data back. Looks like they have changed things again. Are things working for you?
I really haven’t messed with it since that night. I remember hitting a road block of sorts even after I made my tweaks. But I never used it before that night so I really am not sure exactly what it was supposed to be returning.
Will Blanton [email protected]
On Mar 8, 2020, at 13:38, William Scanlon [email protected] wrote:
I finally got around to testing this out. It still isn't working for me. The SSL errors are gone, but I don't get any data back. Looks like they have changed things again. Are things working for you?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Gotcha, thanks for the feedback. Yeah this is the issue with trying to use an undocumented non-public API. It will always be a battle to keep it working.
Looks to me like this is an issue with the cookies not being passed correctly and ticking off the API. At this point I will probably make my own project and use a framework like selenium to interact with the page in a front-end kind of approach(with javascript injection), this will probably be more resilient than constantly updating API changes
Hi @atcole4
Can you try applying the headers to the initial get_meters call as seen in this pull request #5? I'm interested in knowing if its the same issue I ran into.