]> git.phdru.name Git - bookmarks_db.git/commitdiff
Show version_info in X-User-Agent header.
authorOleg Broytman <phd@phdru.name>
Fri, 28 Dec 2007 15:33:57 +0000 (15:33 +0000)
committerOleg Broytman <phd@phdru.name>
Fri, 28 Dec 2007 15:33:57 +0000 (15:33 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@141 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

Robots/bkmk_rsimple.py

index c3311bc475c203c38de354fffb657a324175ef55..c0bf93055aa80e48f004eed10c804e89b34e6e63 100644 (file)
@@ -48,7 +48,7 @@ urllib._urlopener = MyURLopener()
 # Fake headers to pretend this is a real browser
 _version = "Links (2.1; Linux 2.6 i686; 80x25)"
 urllib._urlopener.addheaders[0] = ('User-Agent', _version)
-_version = "bookmarks_db (Python-urllib/%s)" % urllib.__version__
+_version = "bookmarks_db (Python %d.%d.%d; urllib/%s)" % (sys.version_info[:3], urllib.__version__)
 urllib._urlopener.addheader('X-User-Agent', _version)
 
 urllib._urlopener.addheader('Connection', 'close')