本文整理汇总了Python中BaseHTMLProcessor.BaseHTMLProcessor.reset方法的典型用法代码示例。如果您正苦于以下问题:Python BaseHTMLProcessor.reset方法的具体用法?Python BaseHTMLProcessor.reset怎么用?Python BaseHTMLProcessor.reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseHTMLProcessor.BaseHTMLProcessor
的用法示例。
在下文中一共展示了BaseHTMLProcessor.reset方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: reset
# 需要导入模块: from BaseHTMLProcessor import BaseHTMLProcessor [as 别名]
# 或者: from BaseHTMLProcessor.BaseHTMLProcessor import reset [as 别名]
def reset(self,query):
#query is the list of keywords,eg:['yu','aoi']
query=[escape(word) for word in query]
words='|'.join(query)
self.Q_PATTERN=re.compile(r'(?P<query>' + words + r')',re.I)
self.highlight=0
BaseHTMLProcessor.reset(self)
示例2: reset
# 需要导入模块: from BaseHTMLProcessor import BaseHTMLProcessor [as 别名]
# 或者: from BaseHTMLProcessor.BaseHTMLProcessor import reset [as 别名]
def reset(self):
self._start_a = None
self.methodQueue = []
self.divClassStack = []
self.articleRec = []
BaseHTMLProcessor.reset(self)
示例3: reset
# 需要导入模块: from BaseHTMLProcessor import BaseHTMLProcessor [as 别名]
# 或者: from BaseHTMLProcessor.BaseHTMLProcessor import reset [as 别名]
def reset(self):
# extend (called from __init__ in ancestor)
# Reset all data attributes
self.verbatim = 0
BaseHTMLProcessor.reset(self)
示例4: reset
# 需要导入模块: from BaseHTMLProcessor import BaseHTMLProcessor [as 别名]
# 或者: from BaseHTMLProcessor.BaseHTMLProcessor import reset [as 别名]
def reset(self):
'''extend (called from __init__ in ancestor)'''
self.verbatim = 0
BaseHTMLProcessor.reset(self)
示例5: reset
# 需要导入模块: from BaseHTMLProcessor import BaseHTMLProcessor [as 别名]
# 或者: from BaseHTMLProcessor.BaseHTMLProcessor import reset [as 别名]
def reset(self):
BaseHTMLProcessor.reset(self)
self.colorindex = 0
self.needcolor = 0