URL normalization for Python