【发布时间】:2020-04-09 03:03:48
【问题描述】:
我有一个类似于http://www.example.com/link?url=http://www.google.com 的网址。当在浏览器中打开时,URL 会重定向到 http://www.google.com。但是当我检查 URL 的状态码时,它显示的是 200 而不是 3xx。即使我检查print(url.history),它也会显示[]。请解释!
编辑:我检查了请求的响应:
var url = 'http://www.google.com';
window.location=url;
</script>
<!-- Form pop up box -->
<div id="popUpPageConatiner" style="display:none;" ></div>
<!-- close form pop up box -->
【问题讨论】:
-
这似乎是一个 DUPE 问题stackoverflow.com/questions/20475552/…
-
这能回答你的问题吗? Python Requests library redirect new url
-
对不起,但它仍然不能解决我的问题。
标签: python python-3.x url redirect python-requests