alanmcintyre/btce-api — pull request #26 by alexknvl (2013-12-02 23:25:02+00:00)
Title: Fixed main page scraping.

I have recently noticed that the show-chat.py stopped working. A little investigation revealed that from now on the BTC-e site requires you to pass valid cookies to access its web-pages (not API). Cookies are set both using `Set-Cookie` header and `document.cookie=...` javascript code.

This pull-request adds a `cookie` variable to the `BTCEConnection`, which is automatically set whenever `makeRequest` is called with `with_cookie=True`. I would rather prefer to use `cookielib` instead of regular expressions, however `cookielib` doesn't work well with the `httplib` module.