#!/usr/bin/env python import cStringIO # import formatter # from htmllib import HTMLParser # We use various classes in these modules for parsing HTML. import httplib # We only need an exception from this module import os # This provides various file…