Skip to content
Snippets Groups Projects
Unverified Commit cbf462f0 authored by Adam Williamson's avatar Adam Williamson Committed by GitHub
Browse files

Merge pull request #285 from marcfrederick/262-proxy-documentation

Document how to connect using a proxy
parents 792dfeb2 872afb38
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,22 @@ Note that MwClient appends its own user agent to the end of your string.
.. _errors:
Using a proxy
-------------
If you need to use a proxy, you can configure the :class:`requests.Session`
using the `reqs` parameter of the :class:`~mwclient.client.Site`.
.. code-block:: python
import mwclient
proxies = {
'http': 'http://10.10.1.10:3128',
'https': 'http://10.10.1.10:1080',
}
site = mwclient.Site('en.wikipedia.org', reqs={"proxy": proxies})
Errors and warnings
-------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment