| 1 |
from __future__ import absolute_import |
| 2 |
|
| 3 |
import logging |
| 4 |
|
| 5 |
from ._clientcookie import request_host_lc as request_host |
| 6 |
|
| 7 |
from ._clientcookie import (Cookie, CookieJar, CookiePolicy, |
| 8 |
DefaultCookiePolicy, FileCookieJar, LoadError, |
| 9 |
LWPCookieJar, MozillaCookieJar, |
| 10 |
effective_request_host, lwp_cookie_str) |
| 11 |
|
| 12 |
from ._form_controls import ( |
| 13 |
AmbiguityError, CheckboxControl, Control, ControlNotFoundError, |
| 14 |
FileControl, HiddenControl, HTMLForm, IgnoreControl, ImageControl, Item, |
| 15 |
ItemCountError, ItemNotFoundError, Label, ListControl, LocateError, |
| 16 |
Missing, PasswordControl, RadioControl, ScalarControl, SelectControl, |
| 17 |
SubmitButtonControl, SubmitControl, TextareaControl, TextControl) |
| 18 |
from ._html import Factory, Link |
| 19 |
|
| 20 |
from ._entities import html5_entities |
| 21 |
from ._equiv import HTTPEquivParser |
| 22 |
|
| 23 |
from ._mechanize import (Browser, BrowserStateError, FormNotFoundError, |
| 24 |
History, LinkNotFoundError) |
| 25 |
from ._opener import ContentTooShortError, OpenerFactory, urlretrieve |
| 26 |
from ._response import (make_response, response_seek_wrapper, |
| 27 |
seek_wrapped_response) |
| 28 |
from ._rfc3986 import urljoin |
| 29 |
from ._urllib2 import ( |
| 30 |
AbstractBasicAuthHandler, AbstractDigestAuthHandler, BaseHandler, |
| 31 |
CacheFTPHandler, FileHandler, FTPHandler, HTTPBasicAuthHandler, |
| 32 |
HTTPCookieProcessor, HTTPDefaultErrorHandler, HTTPDigestAuthHandler, |
| 33 |
HTTPEquivProcessor, HTTPError, HTTPErrorProcessor, HTTPHandler, |
| 34 |
HTTPPasswordMgr, HTTPPasswordMgrWithDefaultRealm, HTTPProxyPasswordMgr, |
| 35 |
HTTPRedirectDebugProcessor, HTTPRedirectHandler, HTTPRefererProcessor, |
| 36 |
HTTPRefreshProcessor, HTTPResponseDebugProcessor, HTTPRobotRulesProcessor, |
| 37 |
HTTPSClientCertMgr, HTTPSHandler, OpenerDirector, ProxyBasicAuthHandler, |
| 38 |
ProxyDigestAuthHandler, ProxyHandler, Request, RobotExclusionError, |
| 39 |
SeekableResponseOpener, UnknownHandler, URLError, build_opener, |
| 40 |
install_opener, urlopen) |
| 41 |
|
| 42 |
from ._useragent import UserAgent, UserAgentBase |
| 43 |
from ._util import http2time as str2time |
| 44 |
from ._version import __version__ |
| 45 |
from ._gzip import HTTPGzipProcessor |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
USE_BARE_EXCEPT = True |
| 50 |
|
| 51 |
logger = logging.getLogger("mechanize") |
| 52 |
if logger.level is logging.NOTSET: |
| 53 |
logger.setLevel(logging.CRITICAL) |
| 54 |
del logger |
| 55 |
__all__ = [ |
| 56 |
'AbstractBasicAuthHandler', |
| 57 |
'AbstractDigestAuthHandler', |
| 58 |
'BaseHandler', |
| 59 |
'Browser', |
| 60 |
'BrowserStateError', |
| 61 |
'CacheFTPHandler', |
| 62 |
'ContentTooShortError', |
| 63 |
'Cookie', |
| 64 |
'CookieJar', |
| 65 |
'CookiePolicy', |
| 66 |
'DefaultCookiePolicy', |
| 67 |
'effective_request_host', |
| 68 |
'FTPHandler', |
| 69 |
'Factory', |
| 70 |
'FileCookieJar', |
| 71 |
'FileHandler', |
| 72 |
'FormNotFoundError', |
| 73 |
'HTTPBasicAuthHandler', |
| 74 |
'HTTPCookieProcessor', |
| 75 |
'HTTPDefaultErrorHandler', |
| 76 |
'HTTPDigestAuthHandler', |
| 77 |
'HTTPEquivProcessor', |
| 78 |
'HTTPError', |
| 79 |
'HTTPErrorProcessor', |
| 80 |
'HTTPGzipProcessor', |
| 81 |
'HTTPHandler', |
| 82 |
'HTTPSHandler', |
| 83 |
'HTTPPasswordMgr', |
| 84 |
'HTTPPasswordMgrWithDefaultRealm', |
| 85 |
'HTTPProxyPasswordMgr', |
| 86 |
'HTTPRedirectDebugProcessor', |
| 87 |
'HTTPRedirectHandler', |
| 88 |
'HTTPRefererProcessor', |
| 89 |
'HTTPRefreshProcessor', |
| 90 |
'HTTPResponseDebugProcessor', |
| 91 |
'HTTPRobotRulesProcessor', |
| 92 |
'HTTPSClientCertMgr', |
| 93 |
'History', |
| 94 |
'LWPCookieJar', |
| 95 |
'Link', |
| 96 |
'LinkNotFoundError', |
| 97 |
'LoadError', |
| 98 |
'MozillaCookieJar', |
| 99 |
'OpenerDirector', |
| 100 |
'OpenerFactory', |
| 101 |
'ProxyBasicAuthHandler', |
| 102 |
'ProxyDigestAuthHandler', |
| 103 |
'ProxyHandler', |
| 104 |
'Request', |
| 105 |
'RobotExclusionError', |
| 106 |
'SeekableResponseOpener', |
| 107 |
'URLError', |
| 108 |
'USE_BARE_EXCEPT', |
| 109 |
'UnknownHandler', |
| 110 |
'UserAgent', |
| 111 |
'UserAgentBase', |
| 112 |
'HTTPEquivParser', |
| 113 |
'html5_entities', |
| 114 |
'__version__', |
| 115 |
'build_opener', |
| 116 |
'install_opener', |
| 117 |
'lwp_cookie_str', |
| 118 |
'make_response', |
| 119 |
'request_host', |
| 120 |
'response_seek_wrapper', |
| 121 |
|
| 122 |
|
| 123 |
'seek_wrapped_response', |
| 124 |
'str2time', |
| 125 |
'urlopen', |
| 126 |
'urlretrieve', |
| 127 |
'urljoin', |
| 128 |
|
| 129 |
|
| 130 |
'AmbiguityError', |
| 131 |
'ControlNotFoundError', |
| 132 |
'ItemCountError', |
| 133 |
'ItemNotFoundError', |
| 134 |
'LocateError', |
| 135 |
'Missing', |
| 136 |
|
| 137 |
'CheckboxControl', |
| 138 |
'Control', |
| 139 |
'FileControl', |
| 140 |
'HTMLForm', |
| 141 |
'HiddenControl', |
| 142 |
'IgnoreControl', |
| 143 |
'ImageControl', |
| 144 |
'Item', |
| 145 |
'Label', |
| 146 |
'ListControl', |
| 147 |
'PasswordControl', |
| 148 |
'RadioControl', |
| 149 |
'ScalarControl', |
| 150 |
'SelectControl', |
| 151 |
'SubmitButtonControl', |
| 152 |
'SubmitControl', |
| 153 |
'TextControl', |
| 154 |
'TextareaControl', |
| 155 |
] |