# 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 %d.%d.%d; urllib/%s)" % (sys.version_info[:3], urllib.__version__)
+_version = "bookmarks_db (Python %d.%d.%d; urllib/%s)" % (
+ sys.version_info[0], sys.version_info[1], sys.version_info[2], urllib.__version__)
urllib._urlopener.addheader('X-User-Agent', _version)
urllib._urlopener.addheader('Connection', 'close')