url_type, netloc, url_path, query, url_tag = split_results
url_host = split_results.hostname
- url = "%s://%s%s" % (url_type, url_host, url_path)
+ if query:
+ url = "%s://%s%s?%s" % (url_type, url_host, url_path, query)
+ else:
+ url = "%s://%s%s" % (url_type, url_host, url_path)
error, redirect_code, redirect_to, headers, content = \
self.get(bookmark, url, True)
if icons[icon_url]:
bookmark.icon_href = icon_url
content_type, bookmark.icon = icons[icon_url]
- self.log(" cached icon: %s" % content_type)
+ self.log(" cached icon : %s"
+ % content_type)
else:
- self.log(" cached icon: no icon")
+ self.log(" cached icon : no icon")
+ elif icon_url.startswith('data:'):
+ content_type, icon_data = \
+ icon_url[len('data:'):].split(',', 1)
+ bookmark.icon_href = bookmark.icon = icon_url
+ self.log(" got data icon : %s" % content_type)
+ icons[icon_url] = (content_type, icon_url)
else:
try:
_icon_url = icon_url