On Fri, Apr 18, 2008 at 8:19 AM, Monika Jisswel <[EMAIL PROTECTED]> wrote:
> Hi, > > can i stop urllib2.urlopen() from following redirects automatically ? There doesn't seem to be an easy way to do this. Probably the simplest way is to create a subclass of HTTPRedirectHandler that does nothing and build an opener that uses that. > > > one more question i had in mind, the function urllib2.urlopen.geturl() > does get me what i want but does it do the download of the page i was > redirected to ? or just downloads the initial page that actually does the > redirect ? > It gets the page you were redirected to. If you want access to the redirect code, see the note about Universal Feed Parser here: http://personalpages.tds.net/~kent37/kk/00010.html#e10other-resources<http://personalpages.tds.net/%7Ekent37/kk/00010.html#e10other-resources> Kent
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor