[Tutor] Strategy to read a redirecting html page

Robert Sjoblom robert.sjoblom at gmail.com
Thu Jun 2 23:05:39 CEST 2011


On 2 June 2011 22:50, Brett Ritter <swiftone at swiftone.org> wrote:
> 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
>
Ah, I see -- but people were talking about 301 and 302's, so I assumed
the topic had moved to general redirections. My bad.


-- 
best regards,
Robert S.


More information about the Tutor mailing list