So my idea was to basically make something simple when a page re-directs it should just quit the script. Meaning:
Legit page: https://www.stackoverflow.com Redirected: https://www.stackoverflow.com/Helloworld
Right now I am just using
import requests
try:
r = requests.get('https://www.stackoverflow.com')
print r.status_code
except:
sys.exit()
what I want to do is that whenever it the requests.get
gets re-directed. It should hit the exception where I later can use sys.exit()
Or it should just sys.exit()
overall if it redirects.