url_host, url_path = urllib.splithost(url_rest)
url_path, url_tag = urllib.splittag(url_path)
+ # Set fake referer to the root of the site
urllib._urlopener.addheaders[2] = ('Referer', "%s://%s%s" % (url_type, url_host, url_path))
+
if bookmark.charset: urllib._urlopener.addheader('Accept-Charset', bookmark.charset)
fname, headers = urllib.urlretrieve("%s://%s%s" % (url_type, url_host, url_path), self.tempfname)
if bookmark.charset: del urllib._urlopener.addheaders[-1]