From: Oleg Broytman Date: Tue, 18 Dec 2007 17:58:37 +0000 (+0000) Subject: I saw a number of sites that forbid "Mozilla compatible". X-Git-Tag: v4.5.3~261 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=67061c83af5f8afeb67532b4a1ae854e750235f8;hp=dc08282f6ed82b219e8b27ae761dd4d45a0f2e50;p=bookmarks_db.git 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 --- 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)