How can I retrieve the page title of a webpage (title html tag) using Python?
The mechanize Browser object has a title() method. So the code from this post can be rewritten as:
from mechanize import Browser br = Browser() br.open("http://www.google.com/") print br.title()