python - send authenticated request while calling github api to have greater limit -


i calling github api python scripts. if run successfully, have made around 3000 calls. however, after 50-60 successful calls, shows below message-

{'message': "api rate limit exceeded 108.169.151.47. (but here's news: authenticated requests higher rate limit. check out documentation more details.)", 'documentation_url': 'https://developer.github.com/v3/#rate-limiting'} 

i have read documentation. don't have application register client id , client secret. github account, generated token. i'm wondering if can use send authenticated requests. tried curl command log in through github profile in git bash, , run python script, still shows same message.

can suggest way how can make use of news in message?

you might want consider using basic authentication github username , password. response received should converted json.

req = requests.get(url, auth=(username, password)) req_json = req.json() 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -