pydukeenergy icon indicating copy to clipboard operation
pydukeenergy copied to clipboard

Made some changes to get most of it somewhat functional.

Open FreeWillyB opened this issue 4 years ago • 5 comments

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.

FreeWillyB avatar Feb 11 '20 05:02 FreeWillyB

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?

w1ll1am23 avatar Mar 08 '20 17:03 w1ll1am23

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.

FreeWillyB avatar Mar 08 '20 17:03 FreeWillyB

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.

w1ll1am23 avatar Mar 08 '20 18:03 w1ll1am23

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

atcole4 avatar Jul 07 '20 01:07 atcole4

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.

anchepiece avatar Jul 22 '20 20:07 anchepiece