Removed unused code
Fixed flake8 warning (discovery.py:99:49: F812 list comprehension redefines 'endpoint' from line 97)
Fixed string formatting error
Added Python 3 support
Made methods static if applicable
Fixed 'stream_liveview' generator