示例#1
0
def drop_ignore_trees(html):
    for tag in defs.ignore_tags:
        html = drop_tree(html, tag)
    dom = fromstring(html)
    # remove blogs comments
    for e in dom.cssselect("#comments,.comments"):
        e.drop_tree()
    return unicode(tostring(dom))
示例#2
0
文件: sect.py 项目: after12am/summary
 def a_droped_text(self):
     droped = drop_tree(drop_tree(self.body, 'a'), '\s')
     if len(droped) > 0:
         return text_content(droped)
     return u''
示例#3
0
 def a_droped_text(self):
     droped = drop_tree(drop_tree(self.body, 'a'), '\s')
     if len(droped) > 0:
         return text_content(droped)
     return u''