How to get releases list from from python

I need to get the releases list from github url in json format because I have to develop a notification service which alert a new version presence.
I tried to follow this guide
but not all github url can respond in json format.
For example:

curl \
  -H "Accept: application/vnd.github.v3+json" \

doesn’ t works. I can see only text/html content

How could i resolve it?