SyntaxFix
Write A Post
Hire A Developer
Questions
I think requests.head instead of requests.get will be more safe to call when handling url redirect,check the github issue here:
r = requests.head(url, allow_redirects=True) print(r.url)