Created
November 20, 2017 10:20
-
-
Save nikhilkumarsingh/7457d730d43bcea5005d65bf40e81a52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = input("Enter the URL: ") | |
r = requests.get(url) | |
print("{} redirections took place.".format(len(r.history)-1)) | |
print("Following redirections took place:") | |
for x in r.history: | |
print(x.url, end="\n\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment