我正在使用 python 构建一个应用程序,其中涉及从 RSS 提要获取新闻文章。作为我项目的一部分,我决定使用boilerpipe 来从出现文章的html 页面中提取文章内容。
尽管boilerpipe 最初是为java 编写的,但它也已被移植到python。你可以在这里看到它在 github 上的页面:https ://github.com/misja/python-boilerpipe
问题是我在尝试使用以下方法导入它时遇到异常:
from boilerpipe.extract import Extractor
我得到的错误是:
Traceback (most recent call last):
File "", line 1, in
File "build\bdist.win32\egg\boilerpipe\extract__init__.py", line 12, in
File "C:\Python26\lib\site-packages\jpype_jclass.py", line 54, in JClass
raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)
jpype._jexception.ExceptionPyRaisable: java.lang.Exception: Class
de.l3s.boilerpipe.sax.HTMLHighlighter not found
什么可能导致此问题,我该如何解决?