Lines Matching refs:urlopen
31 the *urlopen* function. This is capable of fetching URLs using a variety of
41 For straightforward situations *urlopen* is very easy to use. But as soon as you
56 with urllib.request.urlopen('http://python.org/') as response:
67 with urllib.request.urlopen('http://python.org/') as response:
82 object that specifies the URL you want to fetch. Calling ``urlopen`` with this
90 with urllib.request.urlopen(req) as response:
128 with urllib.request.urlopen(req) as response:
159 >>> data = urllib.request.urlopen(full_url)
194 with urllib.request.urlopen(req) as response:
204 *urlopen* raises :exc:`URLError` when it cannot handle a response (though as
224 >>> try: urllib.request.urlopen(req)
239 urlopen will raise an :exc:`HTTPError`. Typical errors include '404' (page not
333 ... urllib.request.urlopen(req)
357 from urllib.request import Request, urlopen
361 response = urlopen(req)
382 from urllib.request import Request, urlopen
386 response = urlopen(req)
401 The response returned by urlopen (or the :exc:`HTTPError` instance) has two
406 because ``urlopen`` (or the opener object used) may have followed a
424 the default opener - via ``urlopen`` - but you can create custom
446 opener. This means that calls to ``urlopen`` will use the opener you have
450 urls in the same way as the ``urlopen`` function: there's no need to call
510 # Now all calls to urllib.request.urlopen use our opener.
576 # this call to urllib.request.urlopen now uses the default timeout
579 response = urllib.request.urlopen(req)