0
我希望最多允許3個重定向到urllib2.urlopen()
。我如何在urllib2.urlopen
中指定?如何在Python中爲urllib2.urlopen設置最大重定向次數?
我希望最多允許3個重定向到urllib2.urlopen()
。我如何在urllib2.urlopen
中指定?如何在Python中爲urllib2.urlopen設置最大重定向次數?
您可以定義自己的HTTPRedirectHandler
來計算重定向的次數,然後install it to be used by urllib2。