如何在 grequests 中跟踪重定向?
在请求库中,我们可以简单地使用 :r = requests.get(url, allow_redirects=True)
来允许重定向。
grequests 中有什么吗?
我检查了https://pypi.org/project/grequests/但没有发现任何东西。
是的,您可以对grequests
. 如果您查看grequests
该类,您可以看到该send
方法本身将调用委托给实际request.Session().request
方法。所以你可以这样做
rs = grequests.get(u, allow_redirects=True)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句