= URL "https://www.baidu.com/" URL = 'HTTP: //www.freebuf.com/fevents/133225.html' # Method a: prohibit Jump: = False allow_redirects # retransmission request, responsive to give = requests.get Response (URL, headers = headers, allow_redirects = False) # return a status code Print (response.status_code) # method two: before and after comparison URL Print (URL) Print (response.url)