Instead of querying the github API manually, I suggest to use the PyGithub python package: https://github.com/PyGithub/PyGithub
Instead of querying the github API manually, I suggest to use the PyGithub python package: https://github.com/PyGithub/PyGithub