Part of twisted.web View Source
Class | PartialDownloadError | Page was only partially downloaded, we got disconnected in middle. |
Class | HTTPPageGetter | Gets a resource via HTTP, then quits. |
Class | HTTPPageDownloader | Undocumented |
Class | HTTPClientFactory | Download a given URL. |
Class | HTTPDownloader | Download to a file. |
Function | getPage | Download a web page as a string. |
Function | downloadPage | Download a web page to a file. |
Class | ResponseDone | ResponseDone
may be passed to IProtocol.connectionLost on the protocol
passed to Response.deliverBody
and indicates that the entire response has been delivered.
|
Class | Response | A Response
instance describes an HTTP response received from an HTTP server.
|
Class | WebClientContextFactory 0 | A web context factory which doesn't work because the necessary SSL support is missing. |
Class | WebClientContextFactory | A web context factory which ignores the hostname and port and does no certificate verification. |
Class | Agent | Agent is a very
basic HTTP client. It supports HTTP and HTTPS scheme URIs
(but performs no certificate checking by default). It does not support
persistent connections.
|
Function | _parse | Split the given URL into the scheme, host, port, and path. |
Function | _makeGetterFactory | Create and connect an HTTP page getting factory. |
Class | _WebToNormalContextFactory | Adapt a web context factory to a normal context factory. |
Parameters | url | An URL to parse.
(type: str
) |
defaultPort | An alternate value to use as the port if the URL does not include
one.
(type: int or None
) | |
Returns | A four-tuple of the scheme, host, port, and path of the URL. All of
these are str instances except for port, which is an
int .
|
Create and connect an HTTP page getting factory.
Any additional positional or keyword arguments are used when callingfactoryFactory
.
Parameters | factoryFactory | Factory factory that is called with url , args
and kwargs to produce the getter
|
contextFactory | Context factory to use when creating a secure connection, defaulting to
None
| |
Returns | The factory created by factoryFactory
|
Download a web page as a string.
Download a page. Return a deferred, which will callback with a page (as a string) or errback with a description of the error.
SeeHTTPClientFactory
to see what extra arguments can be passed.
Parameters | file | path to file on filesystem, or file-like object. See HTTPDownloader to see what extra args can be passed. |