Use urllib.parse.quote instead of urllib.quote for python > 3.x
Fixed indentation according to PEP8
Fixed indentation according to PEP8