How to use 'urllib2 user agent' in Python

Every line of 'urllib2 user agent' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
47def _user_agent(self):
48 os = re.sub('([^-]+)-(.*)', '\\1/\\2', platform.platform())
50 return 'asciinema/%s %s/%s %s' % (__version__,
51 platform.python_implementation(), platform.python_version(), os)

Related snippets