AttributeError: 'module' object has no attribute 'parse'
Traceback (most recent call last):
File ".\sublime_plugin.py", line 362, in run_
File ".\string_encode.py", line 17, in run
File ".\string_encode.py", line 125, in encode
AttributeError: 'module' object has no attribute 'parse'
Traceback (most recent call last):
File ".\sublime_plugin.py", line 362, in run_
File ".\string_encode.py", line 17, in run
File ".\string_encode.py", line 130, in encode
AttributeError: 'module' object has no attribute 'parse'
urllib.parse.quote and urllib.parse.unquote must be urllib.quote and urllib.unquote.
And i think urllib.quote_plus(text) is better than urllib.quote(text).replace('/', '%2F'), in this way urllib.unquote(text) → urllib.unquote_plus(text).
Url Encode, URL Decode:
urllib.parse.quote
andurllib.parse.unquote
must beurllib.quote
andurllib.unquote
.And i think
urllib.quote_plus(text)
is better thanurllib.quote(text).replace('/', '%2F')
, in this wayurllib.unquote(text)
→urllib.unquote_plus(text)
.