Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Access the Response Methods and Attributes in python Show redirections

import requests
 
url = 'https://codegrepper.com/redirects/redirect_chain_allowed'
response = requests.get(url)
 
for redirect in response.history:
    print(redirect.url, redirect.status_code)
print(response.url, response.status_code)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Access #Response #Methods #Attributes #python #Show #redirections
ADD COMMENT
Topic
Name
9+3 =