From 67061c83af5f8afeb67532b4a1ae854e750235f8 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 18 Dec 2007 17:58:37 +0000 Subject: [PATCH] I saw a number of sites that forbid "Mozilla compatible". git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@115 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- Robots/bkmk_rsimple.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index 50db388..57006da 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -44,8 +44,7 @@ class MyURLopener(urllib.URLopener): urllib._urlopener = MyURLopener() -# Some sites allow only Mozilla-compatible browsers; way to stop robots? -server_version = "Mozilla/3.0 (compatible; Python-urllib/%s)" % urllib.__version__ +server_version = "bookmarks_db (Python-urllib/%s)" % urllib.__version__ urllib._urlopener.addheaders[0] = ('User-agent', server_version) -- 2.39.5