[英]How to speed up web scraping with nested urllib2.urlopen() in Python?
[英]How to set the maximum number of redirects for urllib2.urlopen in Python?
我想為urllib2.urlopen()
最多允許3個重定向。 如何在urllib2.urlopen
指定urllib2.urlopen
?
您定義自己的HTTPRedirectHandler
,它計算重定向的數量,然后安裝它以供urllib2使用 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.