Rewrite to python module
Rewrite to python module

- use logging module instead of print
- return results of function calls
- only do sample code if run as program instead of loaded as module
- removed unused variables + urllib.parse

spaze/oprah-proxy,spaze/oprah-proxy