本文整理汇总了Python中URLMonitor.URLMonitor.get_instance方法的典型用法代码示例。如果您正苦于以下问题:Python URLMonitor.get_instance方法的具体用法?Python URLMonitor.get_instance怎么用?Python URLMonitor.get_instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类URLMonitor.URLMonitor
的用法示例。
在下文中一共展示了URLMonitor.get_instance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from URLMonitor import URLMonitor [as 别名]
# 或者: from URLMonitor.URLMonitor import get_instance [as 别名]
def __init__(self, channel, queued, reactor = reactor):
Request.__init__(self, channel, queued)
logging.debug('Client request initiated...')
self.reactor = reactor
self.url_monitor = URLMonitor.get_instance()
self.cookie_cleaner = CookieCleaner.get_instance()
self.dns_cache = DNSCache.get_instance()
示例2: __init__
# 需要导入模块: from URLMonitor import URLMonitor [as 别名]
# 或者: from URLMonitor.URLMonitor import get_instance [as 别名]
def __init__(self, command, uri, postData, headers, client):
self.command = command
self.uri = uri
self.postData = postData
self.headers = headers
self.client = client
self.url_monitor = URLMonitor.get_instance()
self.isImageRequest = False
self.isCompressed = False
self.contentLength = None
self.shutdownComplete = False