'Attempts to return the URL to an apple-touch-icon icon with the
passed dimension. If a dimension is not defined, checks for one with an
undefined size. If no icon matching the criteria can be found, returns
None.'

def _check_apple_icon_size(self, dimension):

    selector = 'link[rel="apple-touch-icon-precomposed"]'
    if dimension:
        selector = ('%s[sizes="%sx%s"]' % (selector, dimension, dimension))
    try:
        return self._document(selector)[0].attrib['href']
    except:
        return None
