def getPage(url, contextFactory=None, *args, **kwargs):
scheme, host, port, path = client._parse(url)<EOL>factory = client.HTTPClientFactory(url, *args, **kwargs)<EOL>if scheme == '<STR_LIT>':<EOL><INDENT>if contextFactory is None:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>conn = reactor.connectSSL(host, port, factory, contextFactory)<EOL><DEDENT>else:<EOL><INDENT>conn = reactor.connectTCP(host, port, factory)<EOL><DEDENT>return factory<EOL>
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.

    See HTTPClientFactory to see what extra args can be passed.