Hello everybody,
I try to get the latest commit date from GitHub by using the GitHub API. This is the code I use:
Can anyone help me?
I try to get the latest commit date from GitHub by using the GitHub API. This is the code I use:
import requests response = requests.get("https://api.github.com/repos/quietvoid/dovi_tool/commits") print(response.json()["date"])I hoped to get the output:
2021-11-10T03:39:47ZBut I get the following:
Traceback (most recent call last): File "/home/pi/debug.py", line 4, in <module> print(response.json()["date"]) TypeError: list indices must be integers or slices, not strI have a similar request for another project where I want to get the name and this works fine.
Can anyone help me?