User Agent Module¶
Utilities for setting the User-Agent header for requests.
- author
Doug Skrypa
-
requests_client.user_agent.generate_user_agent(ua_format, downgrade=True, **kwargs)[source]¶ - Parameters
- Return str
The user agent string based on the given format and available system information
-
requests_client.user_agent.USER_AGENT_LIBS= '{py_impl}/{py_ver} Requests/{requests_ver} RequestsClient/{rc_ver}'¶
-
requests_client.user_agent.USER_AGENT_BASIC= '{script}/{script_ver} {py_impl}/{py_ver} Requests/{requests_ver} RequestsClient/{rc_ver}'¶
-
requests_client.user_agent.USER_AGENT_SCRIPT_OS= '{script}/{script_ver} ({os_name} {os_rel}; {arch}) {py_impl}/{py_ver} Requests/{requests_ver} RequestsClient/{rc_ver}'¶
-
requests_client.user_agent.USER_AGENT_SCRIPT_CONTACT= '{script}/{script_ver} ({url}; {email}) {py_impl}/{py_ver} Requests/{requests_ver} RequestsClient/{rc_ver}'¶
-
requests_client.user_agent.USER_AGENT_SCRIPT_URL= '{script}/{script_ver} ({url}) {py_impl}/{py_ver} Requests/{requests_ver} RequestsClient/{rc_ver}'¶
-
requests_client.user_agent.USER_AGENT_SCRIPT_URL_OS= '{script}/{script_ver} ({url}; {os_name} {os_rel}; {arch}) {py_impl}/{py_ver} Requests/{requests_ver} RequestsClient/{rc_ver}'¶
-
requests_client.user_agent.USER_AGENT_SCRIPT_CONTACT_OS= '{script}/{script_ver} ({url}; {email}; {os_name} {os_rel}; {arch}) {py_impl}/{py_ver} Requests/{requests_ver} RequestsClient/{rc_ver}'¶