PEP8 and Pylint.

Comply to PEP8 and Pylint conventions.
For added points, exceptions from requests module are now logged.