1 | __all__ = [ |
---|
2 | 'AbstractBasicAuthHandler', |
---|
3 | 'AbstractDigestAuthHandler', |
---|
4 | 'BaseHandler', |
---|
5 | 'Browser', |
---|
6 | 'BrowserStateError', |
---|
7 | 'CacheFTPHandler', |
---|
8 | 'ContentTooShortError', |
---|
9 | 'Cookie', |
---|
10 | 'CookieJar', |
---|
11 | 'CookiePolicy', |
---|
12 | 'DefaultCookiePolicy', |
---|
13 | 'DefaultFactory', |
---|
14 | 'FTPHandler', |
---|
15 | 'Factory', |
---|
16 | 'FileCookieJar', |
---|
17 | 'FileHandler', |
---|
18 | 'FormNotFoundError', |
---|
19 | 'FormsFactory', |
---|
20 | 'HTTPBasicAuthHandler', |
---|
21 | 'HTTPCookieProcessor', |
---|
22 | 'HTTPDefaultErrorHandler', |
---|
23 | 'HTTPDigestAuthHandler', |
---|
24 | 'HTTPEquivProcessor', |
---|
25 | 'HTTPError', |
---|
26 | 'HTTPErrorProcessor', |
---|
27 | 'HTTPHandler', |
---|
28 | 'HTTPPasswordMgr', |
---|
29 | 'HTTPPasswordMgrWithDefaultRealm', |
---|
30 | 'HTTPProxyPasswordMgr', |
---|
31 | 'HTTPRedirectDebugProcessor', |
---|
32 | 'HTTPRedirectHandler', |
---|
33 | 'HTTPRefererProcessor', |
---|
34 | 'HTTPRefreshProcessor', |
---|
35 | 'HTTPRequestUpgradeProcessor', |
---|
36 | 'HTTPResponseDebugProcessor', |
---|
37 | 'HTTPRobotRulesProcessor', |
---|
38 | 'HTTPSClientCertMgr', |
---|
39 | 'HTTPSHandler', |
---|
40 | 'HeadParser', |
---|
41 | 'History', |
---|
42 | 'LWPCookieJar', |
---|
43 | 'Link', |
---|
44 | 'LinkNotFoundError', |
---|
45 | 'LinksFactory', |
---|
46 | 'LoadError', |
---|
47 | 'MSIECookieJar', |
---|
48 | 'MozillaCookieJar', |
---|
49 | 'OpenerDirector', |
---|
50 | 'OpenerFactory', |
---|
51 | 'ParseError', |
---|
52 | 'ProxyBasicAuthHandler', |
---|
53 | 'ProxyDigestAuthHandler', |
---|
54 | 'ProxyHandler', |
---|
55 | 'Request', |
---|
56 | 'ResponseUpgradeProcessor', |
---|
57 | 'RobotExclusionError', |
---|
58 | 'RobustFactory', |
---|
59 | 'RobustFormsFactory', |
---|
60 | 'RobustLinksFactory', |
---|
61 | 'RobustTitleFactory', |
---|
62 | 'SeekableProcessor', |
---|
63 | 'SeekableResponseOpener', |
---|
64 | 'TitleFactory', |
---|
65 | 'URLError', |
---|
66 | 'USE_BARE_EXCEPT', |
---|
67 | 'UnknownHandler', |
---|
68 | 'UserAgent', |
---|
69 | 'UserAgentBase', |
---|
70 | 'XHTMLCompatibleHeadParser', |
---|
71 | '__version__', |
---|
72 | 'build_opener', |
---|
73 | 'install_opener', |
---|
74 | 'lwp_cookie_str', |
---|
75 | 'make_response', |
---|
76 | 'request_host', |
---|
77 | 'response_seek_wrapper', # XXX deprecate in public interface? |
---|
78 | 'seek_wrapped_response' # XXX should probably use this internally in place of response_seek_wrapper() |
---|
79 | 'str2time', |
---|
80 | 'urlopen', |
---|
81 | 'urlretrieve'] |
---|
82 | |
---|
83 | from _mechanize import __version__ |
---|
84 | |
---|
85 | # high-level stateful browser-style interface |
---|
86 | from _mechanize import \ |
---|
87 | Browser, History, \ |
---|
88 | BrowserStateError, LinkNotFoundError, FormNotFoundError |
---|
89 | |
---|
90 | # configurable URL-opener interface |
---|
91 | from _useragent import UserAgentBase, UserAgent |
---|
92 | from _html import \ |
---|
93 | ParseError, \ |
---|
94 | Link, \ |
---|
95 | Factory, DefaultFactory, RobustFactory, \ |
---|
96 | FormsFactory, LinksFactory, TitleFactory, \ |
---|
97 | RobustFormsFactory, RobustLinksFactory, RobustTitleFactory |
---|
98 | |
---|
99 | # urllib2 work-alike interface (part from mechanize, part from urllib2) |
---|
100 | # This is a superset of the urllib2 interface. |
---|
101 | from _urllib2 import * |
---|
102 | |
---|
103 | # misc |
---|
104 | from _opener import ContentTooShortError, OpenerFactory, urlretrieve |
---|
105 | from _util import http2time as str2time |
---|
106 | from _response import \ |
---|
107 | response_seek_wrapper, seek_wrapped_response, make_response |
---|
108 | from _http import HeadParser |
---|
109 | try: |
---|
110 | from _http import XHTMLCompatibleHeadParser |
---|
111 | except ImportError: |
---|
112 | pass |
---|
113 | |
---|
114 | # cookies |
---|
115 | from _clientcookie import Cookie, CookiePolicy, DefaultCookiePolicy, \ |
---|
116 | CookieJar, FileCookieJar, LoadError, request_host |
---|
117 | from _lwpcookiejar import LWPCookieJar, lwp_cookie_str |
---|
118 | from _mozillacookiejar import MozillaCookieJar |
---|
119 | from _msiecookiejar import MSIECookieJar |
---|
120 | |
---|
121 | # If you hate the idea of turning bugs into warnings, do: |
---|
122 | # import mechanize; mechanize.USE_BARE_EXCEPT = False |
---|
123 | USE_BARE_EXCEPT = True |
---|