def _load_entry(self, entry, fields, add_content):
res = list(_get_val_from_rss_entry(entry, fields))
if add_content:
content = _get_content_from_rss_entry(entry)
if content:
if self._conf["html2text"]:
try:
import html2text as h2t
content = h2t.HTML2Text(bodywidth=74).handle(content)
except ImportError:
self._ctx.log_error(
"RssInput: loading HTML2Text error "
"(module not found)")
res.append("")
res.extend(" " + line.strip()
for line in content.strip().split("\n"))
self._ctx.log_debug(repr(res))
return "\n".join(res).strip()
评论列表
文章目录