本文整理匯總了Python中feed.Feed.append_description方法的典型用法代碼示例。如果您正苦於以下問題:Python Feed.append_description方法的具體用法?Python Feed.append_description怎麽用?Python Feed.append_description使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類feed.Feed
的用法示例。
在下文中一共展示了Feed.append_description方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1:
# 需要導入模塊: from feed import Feed [as 別名]
# 或者: from feed.Feed import append_description [as 別名]
feed.remove_item(child)
continue
else:
wordlists[gid] = wordlist
# Check against blackwords
lvl = wordfilter.check(title, settings.title_scale)
if content != "":
lvl += wordfilter.check(content, 1)
elif summary != "":
lvl += wordfilter.check(summary, 1)
if lvl > settings.threshold:
logging.warn(_("removing item %(title)s with score %(score)i") %
{'title': title, 'score': lvl})
feed.remove_item(child)
del wordlists[gid]
elif settings.appendlvl:
appendstr = "<br><small><small>lvl: %.2g " % lvl + \
"maxcmplvl: %.2f</small></small>" % maxcmplvl
feed.append_description(child, appendstr)
if content != "":
feed.append_content(child, appendstr)
logging.info("%.2g %.2f " % (lvl, maxcmplvl) + title)
if settings.outputfile is None:
# Write output to console
feed.print()
else:
# Write output to file
feed.write(settings.outputfile)