From ba2ef79dfbd437ca0aa8c9de162e10b3c1f8ef43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= <sornjure@gmail.com> Date: Tue, 25 Dec 2018 21:45:07 +0100 Subject: [PATCH] UrlLib --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4c738dd..5f53143 100644 --- a/README.md +++ b/README.md @@ -1169,15 +1169,22 @@ wf.close() ``` -UrlLib ------- -### Translate special characters +Url +--- ```python >>> from urllib.parse import quote, quote_plus, unquote, unquote_plus +``` + +### Encode +```python >>> quote("Can't be in URL!") 'Can%27t%20be%20in%20URL%21' >>> quote_plus("Can't be in URL!") 'Can%27t+be+in+URL%21 +``` + +### Decode +```python >>> unquote('Can%27t+be+in+URL%21') "Can't+be+in+URL!"' >>> unquote_plus('Can%27t+be+in+URL%21')