Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望最多允许 3 个重定向urllib2.urlopen()。我如何在 中指定urllib2.urlopen?
urllib2.urlopen()
urllib2.urlopen
您定义自己的HTTPRedirectHandler计算重定向次数,然后安装它以供 urllib2 使用。
HTTPRedirectHandler