To set max_redirects we have to create requests.Session() object.
session = requests.Session()
session.max_redirects = 3
session.get(url)
Reference: https://stackoverflow.com/questions/31552627/python-requests-limit-number-of-redirects-followed/31553146