'Referer': '/',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) '
'Gecko/20100101 Firefox/120.0',
- 'X-User-Agent': 'bookmarks_db %s (Python %d.%d.%d)' % (
+ 'X-User-Agent': 'bookmarks_db %s (Python %d.%d.%d) ' % (
__version__, *sys.version_info[:3]),
}
setattr(self, attr, value)
Robot.__init__(self, *args, **kw)
socket.setdefaulttimeout(self.timeout)
-
- request_headers['X-User-Agent'] = '%s %s' % (
- request_headers['X-User-Agent'], self.version_str())
+ request_headers['X-User-Agent'] += self.version_str()
def version_str(self):
return self.__class__.__name__