我需要从网络中保存位置 [位置在添加元素之后]。
我尝试使用:
headers = {'charset': 'utf-8', 'Authorization': key}
response = requests.post(url, json=data, headers=headers)
print(response.headers.get('Location'))
但是在请求中,我有 - 没有,我怎么能得到这个元素?
你可以尝试使用allow_redirects = False
吗?它可能有帮助
response = requests.post(url, json=data, headers=headers, allow_redirects=False)
print(response.headers)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句