urllib.quote fix python > 3.x

1. Fixed to use urllib.parse.quote instead of urllib.quote in python > 3.x.

2. Indentation in accordance with PEP8.