Lines Matching refs:opener
406 because ``urlopen`` (or the opener object used) may have followed a
422 When you fetch a URL you use an opener (an instance of the perhaps
424 the default opener - via ``urlopen`` - but you can create custom
431 installed, for example to get an opener that handles cookies, or to get an
432 opener that does not handle redirections.
434 To create an opener, instantiate an ``OpenerDirector``, and then call
438 creating opener objects with a single function call. ``build_opener`` adds
445 ``install_opener`` can be used to make an ``opener`` object the (global) default
446 opener. This means that calls to ``urlopen`` will use the opener you have
478 ``HTTPBasicAuthHandler`` and an opener to use this handler.
503 # create "opener" (OpenerDirector instance)
504 opener = urllib.request.build_opener(handler)
506 # use the opener to fetch a URL
507 opener.open(a_url)
509 # Install the opener.
510 # Now all calls to urllib.request.urlopen use our opener.
511 urllib.request.install_opener(opener)
542 >>> opener = urllib.request.build_opener(proxy_support)
543 >>> urllib.request.install_opener(opener)
603 .. [#] urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe