我需要搜集这个website上所有可用的数据
这是我的密码
import requests
url = "https://bpcleproc.in/EPROC/viewtender/13474"
r = requests.get(url)
print(r)
print(r.text)
我得到的结果是
<Response [200]>
<script type="text/javascript">
window.location.href = "/EPROC/viewtender/13474";
</script>
我不明白为什么这样不行。网站是通过js文件生成的吗
网站会在重定向循环中设置一堆cookies,然后再将您带到最终页面,原因如下:
您可以使用
requests.Session
来模拟该行为:相关问题 更多 >
编程相关推荐