From 3dc28a60e36febe88eefd03dd9254d4623f8aa53 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 30 Dec 2007 21:04:21 +0000 Subject: [PATCH] Added a comment. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@152 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- Robots/bkmk_rsimple.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index 399cf06..f1d8bb3 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -106,7 +106,9 @@ class robot_simple(Robot): 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] -- 2.39.5