November 2001
Beginner
320 pages
5h 53m
English
The urllib module actually provides methods for downloading files, as we've already seen in Chapter 12. It also contains a number of functions for processing/converting URLs into useful formats in the same way as the Perl URI::Escape. The functions in each are summarized in Table 13.1.
| Perl URI::Escape | Python urllib | Description |
|---|---|---|
| uri_escape(string) | urllib.quote (string) | Escapes characters in string with URL compatible formats. Note that the Python quote() does not convert spaces to + characters by default (uri_escape() does). Use the quote_plus() function instead |
| uri_unescape(string) | urllib.unquote (string) | Converts a string that has URL escape sequences embedded into it in a normal ... |
Read now
Unlock full access