I am using a script for getting the metrics of github repositories using github API.
The line which sends the request is like this:
import urllib.request
request_url = urllib.request.urlopen('https://api.github.com/repos/freeCodeCamp/freeCodeCamp/commits?page=1&per_page=100')
I want to find the last page that contains information, so only get the data of that page (for example, page=20). How should I do it?