When I tried with Evernote clipper extension https://chrome.google.com/webstore/detail/evernote-web-clipper/pioclpoplcdbaefihamjohnefbikjilc,
I see a very useful feature.
When I clicked at "article", It gives me a really correct main content of page.
Let see the result when I used Evernote Clipper with page https://developer.chrome.com/extensions/api_index https://developer.chrome.com/extensions/api_index
我查看了evernote字段中的主要文章,在几个页面中,该文章实际上是从第一篇文章标签中提取的。然而,evernote Clipper 仍然可以很好地处理不使用此类标签的页面。
我想知道 Evernote Clipper 是如何做到这一点的?是否有任何js库支持检测包含页面主要内容的主标签。
你能给我一些建议吗?
先感谢您!
据我所知,没有通用的 js 库可以做到这一点。 Evernote Clipper 使用自己的方法从网页中提取“有趣”的内容。
您可以访问 Evernote Clipper 的代码来尝试了解该过程。
在我的 Mac 上,chrome 扩展程序的路径是:
〜/库/应用程序支持/Google/Chrome/默认/扩展/pioclpoplcdbaefihamjohnefbikjilc/6.2_0/
这是另一个工作原理几乎相同的工具:https://www.readability.com/ https://www.readability.com/
您还可以检查此线程:Readability 使用什么算法从 URL 中提取文本? https://stackoverflow.com/questions/3652657/what-algorithm-does-readability-use-for-extracting-text-from-urls
或者在 google 上搜索“内容提取 js lib”等术语。
(找到了这个:https://github.com/hatena/extract-content-javascript https://github.com/hatena/extract-content-javascript)
希望这可以帮助
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)