• Home
  • Raw
  • Download

Lines Matching +full:https +full:- +full:proxy +full:- +full:agent

1 :mod:`urllib` --- Open arbitrary resources by URL
21 This module provides a high-level interface for fetching data across the World
23 built-in function :func:`open`, but accepts Universal Resource Locators (URLs)
24 instead of filenames. Some restrictions apply --- it can only open URLs for
29 The `Requests package <http://docs.python-requests.org/>`_
30 is recommended for a higher-level HTTP client interface.
34 …For HTTPS URIs, :mod:`urllib` performs all the neccessary certificate and hostname checks by defau…
38 …han 2.7.9, urllib does not attempt to validate the server certificates of HTTPS URIs. Use at your …
41 High-level interface
42 --------------------
51 went well, a file-like object is returned. This supports the following
60 these methods have the same interface as for file objects --- see section
61 :ref:`bltin-file-objects` in this manual. (It is not a built-in file object,
62 however, so it can't be used at those few places where a true built-in file
68 :class:`mimetools.Message` containing meta-information associated with the
70 at the head of the retrieved HTML page (including Content-Length and
71 Content-Type). When the method is FTP, a Content-Length header will be
73 to the FTP retrieval request. A Content-Type header will be present if the
74 MIME type can be guessed. When the method is local-file, returned headers
75 will include a Date representing the file's last-modified time, a
76 Content-Length giving file size, and a Content-Type containing a guess at the
91 :mimetype:`application/x-www-form-urlencoded` format; see the :func:`urlencode`
97 identifies the proxy server before starting the Python interpreter. For example
106 shouldn't be reached via proxy; if set, it should be a comma-separated list
110 In a Windows environment, if no proxy environment variables are set, proxy
115 In a Mac OS X environment, :func:`urlopen` will retrieve proxy information
121 proxies. It must be a dictionary mapping scheme names to proxy URLs, where an
123 causes environmental proxy settings to be used as discussed above. For
131 # Use proxies from environment - both versions are equivalent
139 configure the SSL settings that are used if :func:`urlopen` makes a HTTPS
173 third argument may be ``-1`` on older FTP servers which do not return a file
179 :mimetype:`application/x-www-form-urlencoded` format; see the :func:`urlencode`
185 size reported by a *Content-Length* header). This can occur, for example, when
188 The *Content-Length* is treated as a lower bound: if there's more data to read,
195 If no *Content-Length* header was supplied, :func:`urlretrieve` can not check
208 :mailheader:`User-Agent` header than :class:`URLopener` defines. This can be
226 -----------------
231 digits, and the characters ``'_.-'`` are never quoted. By default, this
234 --- its default value is ``'/'``.
249 Replace ``%xx`` escapes by their single-character equivalent.
262 Convert a mapping object or a sequence of two-element tuples to a
263 "percent-encoded" string, suitable to pass to :func:`urlopen` above as the
268 two-element tuples is used as the *query* argument, the first element of
288 Convert the path component *path* from a percent-encoded URL to the local syntax for a
295 This helper function returns a dictionary of scheme to proxy server URL
298 find it, looks for proxy information from Mac OSX System Configuration for
308 because that variable can be injected by a client using the "Proxy:" HTTP
309 header. If you need to use an HTTP proxy in a CGI environment, either use
322 ------------------
330 By default, the :class:`URLopener` class sends a :mailheader:`User-Agent` header
332 Applications can define their own :mailheader:`User-Agent` header by subclassing
337 proxy URLs, where an empty dictionary turns proxies off completely. Its default
338 value is ``None``, in which case environmental proxy settings will be used if
342 it defines the SSL settings the opener uses to make HTTPS connections.
345 authentication of the client when using the :file:`https:` scheme. The keywords
355 proxy information, then calls the appropriate open method with its input
373 local file, the input filename is returned. If the URL is non-local and
383 :mimetype:`application/x-www-form-urlencoded` format; see the :func:`urlencode`
389 Variable that specifies the user agent of the opener object. To get
390 :mod:`urllib` to tell servers that it is a particular user agent, set this in a
440 *Content-Length* header). The :attr:`content` attribute stores the downloaded
447 --------------------------
462 file can't be opened, the URL is re-interpreted using the FTP protocol. This
478 header, which can be inspected by looking at the :mailheader:`Content-Type`
494 listing for the unreadable file. If fine-grained control is needed, consider
508 .. _urllib-examples:
511 --------
518 >>> f = urllib.urlopen("http://www.musi-cal.com/cgi-bin/query?%s" % params)
525 >>> f = urllib.urlopen("http://www.musi-cal.com/cgi-bin/query", params)
528 The following example uses an explicitly specified HTTP proxy, overriding
532 >>> proxies = {'http': 'http://proxy.example.com:8080/'}