Finding Default Page Name using urllib2

Philip Semanchuk philip at
Mon Oct 27 17:29:02 CET 2008

On Oct 27, 2008, at 12:17 PM, barrett wrote:

> Is there a way to find the name of a page you are retrieving using
> python.  For example, if I get i want to know that
> the page is index.html.  I can do this using wget. as seen in the code
> below.  Can I do this in python?

Hi barrett,
Look into the urllib2 module and specifically HTTPRedirectHandler  

Good luck

More information about the Python-list mailing list