git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@152
fdd5c36f-1aea-0310-aeeb-
c58d7e2b6c23
url_host, url_path = urllib.splithost(url_rest)
url_path, url_tag = urllib.splittag(url_path)
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))
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]
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]