def _filter(self, item: str, result: common.Result) -> ty.Iterable[str]:
assert isinstance(item, str)
try:
import html2text as h2t
except ImportError:
raise common.FilterError(self, "module html2text not found")
conv = h2t.HTML2Text(bodywidth=self._conf.get("width"))
yield conv.handle(item)
评论列表
文章目录