scottwernervt/favicon

max-redirect limit should be passed as parameter

parth-fc opened this issue · 0 comments

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