bookmark.icon_href = icon_url
self.log(" got icon : %s" % content_type)
if content_type.startswith("application/") \
bookmark.icon_href = icon_url
self.log(" got icon : %s" % content_type)
if content_type.startswith("application/") \
self.log(" non-image content type, assume x-icon")
content_type = 'image/x-icon'
bookmark.icon = "data:%s;base64,%s" % (content_type, b64encode(icon_data))
self.log(" non-image content type, assume x-icon")
content_type = 'image/x-icon'
bookmark.icon = "data:%s;base64,%s" % (content_type, b64encode(icon_data))