Open HeartToSunshine opened 1 year ago
如果你用底层的 curl-API 的话,怎么重定向,读取 Location header 返回的 URL 都是可以自己实现的。requests-API 中支持 history 在考虑,有空了会弄下。
+1 for this feature
Sorry, there is no direct way to extract the redirect history of a curl request, if you let curl follow redirects automatically, and that's why this issue has been kept open for so long. You can, however, view the history via debug=True
in the debug info.
If you disallow curl to follow redirect automatically, it's possible to extract the next redirect from the Location
header, record it, and then follow it manually. However, that might be less performant.
CurlInfo.REDIRECT_COUNT>0时CurlInfo.REDIRECT_URL)=“”是什么原因呢?或者说作者是否能考虑一下实现一下requests下response.history的功能