Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added code for http session handling, and code refactorization #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

eric-belhomme
Copy link

Hello,
I tried to use your script but I wasn't able to use it as is. After a bit of troubleshooting it appeared that the session cookies were not followed after the initial login and the actual GET for health information.

I'm not a Python expert but I wondered you misused the requests library as you didn't made usage of requests.Session object, so I modified your code to do so, and this fixed my issue.
I also made a huge code refactorization as the JSON parsing is almost always the same.

Many thanks for your inital work, I hope you'll enjoy my modifications.

Kind regards,

Eric

@rkferreira
Copy link
Owner

Hi Eric,
Tks for reviewing this project.

The question you are talking about requests lib, maybe its a version difference.
I'm running this script as it is on:
python26-requests-0.13.1-1.el5
python26-argparse-1.2.1-3.el5

Yes, its old, I know. :)

@rkferreira
Copy link
Owner

About the changes because JSON parse is almost the same, I know, but for organization I kept it separated.

Tks for collaboration

@eric-belhomme
Copy link
Author

eric-belhomme commented Apr 18, 2018 via email

@eric-belhomme
Copy link
Author

eric-belhomme commented Apr 18, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants