Since libtorrent 22.214.171.124, several things have changed:
- Session are handled differently. Must use get_settings() instead of calling settings()
- Also set_settings() has been removed. Now apply_settings() must be used.
- The way proxies are stored has changed too.
Everything has been made backwords compatible.
Plus, I took the liberty of getting rid of the cgi module.
cgi.escape() as been deprecated since Python 3.2
So I replaced it with the html module, as recommended from the Python documentation: