Dimitrios Apostolou <jimis at gmx.net> writes: > P.S. And something simpler: How can I disallow urllib2 to follow > redirections to foreign hosts? You need to subclass `urllib2.HTTPRedirectHandler`, override `http_error_301` and `http_error_302` methods and throw `urllib2.HTTPError` exception. http://diveintopython.org/http_web_services/redirects.html HTH, Rob