示例#1
0
文件: feeds.py 项目: CBIR-LL/Who-am-I
 def item_description(self, item):
     bbcode_parser = BBCodeParser(item.content)
     if len(bbcode_parser.get_all_paragraphs()) > 0:
         s = bbcode_parser.remove_bbcode(bbcode_parser.get_all_paragraphs()[0])
     else:
         s = 'This article doesn\'t have description.'
     return s
示例#2
0
 def item_description(self, item):
     bbcode_parser = BBCodeParser(item.content)
     if len(bbcode_parser.get_all_paragraphs()) > 0:
         s = bbcode_parser.remove_bbcode(
             bbcode_parser.get_all_paragraphs()[0])
     else:
         s = 'This article doesn\'t have description.'
     return s
示例#3
0
def remove_bbcode(s):
    content_bbcode = BBCodeParser(s)
    return content_bbcode.remove_bbcode(s)
示例#4
0
def remove_bbcode(s):
    content_bbcode = BBCodeParser(s)
    return content_bbcode.remove_bbcode(s)