]> git.phdru.name Git - bookmarks_db.git/commitdiff
Added a comment.
authorOleg Broytman <phd@phdru.name>
Sun, 30 Dec 2007 21:04:21 +0000 (21:04 +0000)
committerOleg Broytman <phd@phdru.name>
Sun, 30 Dec 2007 21:04:21 +0000 (21:04 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@152 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

Robots/bkmk_rsimple.py

index 399cf064900be84c7a29e2d43ded5df7aeb7dd47..f1d8bb3d646a7b2c927b71aa9d65428abfbb5d60 100644 (file)
@@ -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]