'Extract the favicon from a website http://en.wikipedia.org/wiki/Favicon
<link rel="shortcut icon" type="image/png" href="favicon.png" />
<link rel="icon" type="image/png" href="favicon.png" />'

def get_favicon(self, doc):

    kwargs = {'tag': 'link', 'attr': 'rel', 'value': 'icon'}
    meta = self.parser.getElementsByTag(doc, **kwargs)
    if meta:
        favicon = self.parser.getAttribute(meta[0], 'href')
        return favicon
    return ''
