I have a list of repositories, I want to receive the latest release through the github api. The code is working, but the error "HTTPError: rate limit exceeded" periodically appears there. I've read the documentation but don't understand how to do it. There's curl for Linux, but I only have the python interpreter itself.
Please explain how to solve this problem. Please show an example code for the python interpreter.
import urllib.request, json
url = 'https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/releases/latest'
try:
u=json.loads(urllib.request.urlopen(url).read().decode()).get('assets', True)
except:
print('HTTPError')
for item in u:
f = item['browser_download_url']
....