python自动解析30一、302重定向连接

使用模块requestspython 方式代码以下:web import requests url_string="http://******" r = requests.head(url_string, stream=True) print r.headers['Location'] 设置属性:allow_redirects = True ,则head方式会自动解析重定向连接,reque
相关文章
相关标签/搜索