def _makeGetterFactory(url, factoryFactory, contextFactory=None, *args, **kwargs):
 uri = URI.fromBytes(url)
 factory = factoryFactory(url, *args, **kwargs)
 if (uri.scheme == 'https'):
  from twisted.internet import ssl
  if (contextFactory is None):
   contextFactory = ssl.ClientContextFactory()
  reactor.connectSSL(nativeString(uri.host), uri.port, factory, contextFactory)
 else:
  reactor.connectTCP(nativeString(uri.host), uri.port, factory)
 return factory

def _makeGetterFactory ( url , factoryFactory , contextFactory = None , * args , ** kwargs ) : uri = URI . fromBytes ( url ) factory = factoryFactory ( url , * args , ** kwargs ) if ( uri . scheme == 'https' ) : from twisted . internet import ssl if ( contextFactory is None ) : contextFactory = ssl . ClientContextFactory ( ) reactor . connectSSL ( nativeString ( uri . host ) , uri . port , factory , contextFactory ) else : reactor . connectTCP ( nativeString ( uri . host ) , uri . port , factory ) return factory
create and connect an http page getting factory .