我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用lxml.html._transform_result()。
def fill_form_html(html, values, form_id=None, form_index=None): result_type = type(html) if isinstance(html, basestring): doc = fromstring(html) else: doc = copy.deepcopy(html) fill_form(doc, values, form_id=form_id, form_index=form_index) return _transform_result(result_type, doc)
def insert_errors_html(html, values, **kw): result_type = type(html) if isinstance(html, basestring): doc = fromstring(html) else: doc = copy.deepcopy(html) insert_errors(doc, values, **kw) return _transform_result(result_type, doc)
def clean_html(self, html): result_type = type(html) if isinstance(html, basestring): doc = fromstring(html) else: doc = copy.deepcopy(html) self(doc) return _transform_result(result_type, doc)
def autolink_html(html, *args, **kw): result_type = type(html) if isinstance(html, basestring): doc = fromstring(html) else: doc = copy.deepcopy(html) autolink(doc, *args, **kw) return _transform_result(result_type, doc)
def word_break_html(html, *args, **kw): result_type = type(html) doc = fromstring(html) word_break(doc, *args, **kw) return _transform_result(result_type, doc)