Help with mechanize

Wojtek Walczak gminick at nie.ma.takiego.adresu.w.sieci.pl
Wed Aug 6 07:55:13 EDT 2008


Dnia Wed, 06 Aug 2008 07:16:37 -0400, Neal Becker napisa³(a):
> I'm trying to use mechanize to read for a M$ mail server.  I can get past the login page OK using:
...
> Now it seems if I read b.links() I can see links to my mail.  My question is, how do I now actually get the contents of this page?


Have you tried follow_link() method?
In your case it should be something like:

response = b.follow_link(b.links()[0]) # I suppose links()
                                       # returns a list or tuple
print response.info() # headers
print response.read() # body

IIRC, it's described in the documentation.

-- 
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/



More information about the Python-list mailing list