Q:

`document.lastModified` in Python

In python, by using an HTML parser, is it possible to get the document.lastModified property of a web page.  I'm trying to retrieve the date at which the webpage/document was last modified by the owner. 

A:

A somewhat related question "I am downloading a file using Python urllib2.  How do I check how large the file size is?",  suggests that the following (untested) code should work:
import urllib2          
req = urllib2.urlopen("http://example.com/file.zip")
total_size = int(req.info().getheader('last-modified'))

You might want to add a default value as the second parameter to getheader(), in case it isn't set.