nltk.set_proxy()

nltk.set_proxy(proxy, user=None, password='')[source]

Set the HTTP proxy for Python to download through.

If proxy is None then tries to set proxy from environment or system settings.

Parameters:
  • proxy – The HTTP proxy server to use. For example: ‘http://proxy.example.com:3128/
  • user – The username to authenticate with. Use None to disable authentication.
  • password – The password to authenticate with.