views:

396

answers:

1

Hi,

I would like to do be able to follow and track redirects and the cookies that are set by the different webpages with Python (a bit like the tamper plugin for Firefox).

So if website1 redirects to website2 which then redirects to website3, I would like to follow that and also see what cookies each website sets. I have been looking at Urllib2 but it redirects by itself and I haven't seen a way to track the redirects.

+2  A: 

there are detailed turorial on this. In dive into python and in voidspace. The short version is that urllib2 provide handlers (That you can override ) to control redirects and cookies.

Igal Serban