[Tutor] Strategy to read a redirecting html page
Brett Ritter
swiftone at swiftone.org
Thu Jun 2 22:50:35 CEST 2011
On Thu, Jun 2, 2011 at 4:06 PM, Robert Sjoblom <robert.sjoblom at gmail.com> wrote:
> Python already has the urllib/urllib2 package that automatically
> follow redirects, so I don't see why you'd need a 3rd-party module to
> deal with it? When it encounters a 301 status code from the server,
Ah, but I believe the issue is that the server isn't giving him a 301,
it's giving him a 200 with a page explaining that "this page has
moved, please update your bookmarks" etc, with a META HTTP-EQUIV tag
to redirect the page after N seconds.
(Based on the part where the OP said "I get the first warning/error
message page and not the redirection one.")
--
Brett Ritter / SwiftOne
swiftone at swiftone.org
More information about the Tutor
mailing list