使用模块请求
方法代码如下:
设置属性:allow _ redirects = True,然后head方法自动解析重定向链接,请求的allow _ redirections . get方法默认为True,head方法默认为False
使用requests.get方法,它自动解析重定向链接