<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getPage(url, contextFactory=None, *args, **kwargs):
 """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. """

    scheme, host, port, path = client._parse(url)
    factory = client.HTTPClientFactory(url, *args, **kwargs)
    if scheme == 'https':
        if contextFactory is None:
            raise RuntimeError, 'must provide a contextFactory'
        conn = reactor.connectSSL(host, port, factory, contextFactory)
    else:
        conn = reactor.connectTCP(host, port, factory)

    return factory