urllib.parse.unquote_to_bytes()

urllib.parse.unquote_to_bytes(string)

Replace %xx escapes by their single-octet equivalent, and return a bytes object.

string may be either a str or a bytes.

If it is a str, unescaped non-ASCII characters in string are encoded into UTF-8 bytes.

Example: unquote_to_bytes('a%26%EF') yields b'a&\xef'.

doc_python
2016-10-07 17:46:45
Comments
Leave a Comment

Please login to continue.