Mercury Web Parser 開源
栏目: JavaScript · 发布时间: 6年前
内容简介:看到「這個版本是用先前其他的軟體與服務可以參考「
看到「 Mercury Goes Open Source! 」這篇, Postlight 的團隊開源了 Mercury Web Parser ,程式碼在 GitHub 上的 postlight/mercury-parser 可以取得。
這個版本是用 Node.js 寫的,可以從範例看出用法以及結果:
import Mercury from '@postlight/mercury-parser'; Mercury.parse(url).then(result => console.log(result););
{
"title": "Thunder (mascot)",
"content": "<div><div><p>This is the content of the page!</div></div>",
"author": "Wikipedia Contributors",
"date_published": "2016-09-16T20:56:00.000Z",
"lead_image_url": null,
"dek": null,
"next_page_url": null,
"url": "https://en.wikipedia.org/wiki/Thunder_(mascot)",
"domain": "en.wikipedia.org",
"excerpt": "Thunder Thunder is the stage name for the horse who is the official live animal mascot for the Denver Broncos",
"word_count": 4677,
"direction": "ltr",
"total_pages": 1,
"rendered_pages": 1
}
先前其他的軟體與服務可以參考「 Evaluating Text Extraction Algorithms 」這篇的整理與比較,不過這篇連原網站都不見了... 只能從 Internet Archive 上翻出來。
這個主題有不少團隊都做過 (給一個 html 網頁,抓出實際的內容塊落),但也死了不少團隊... 比較有印象的是 Readability ,在 2016 年收掉了:「 The Readability bookmarking service will shut down on September 30, 2016. 」。
要撈資料可以拿來用...
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
算法设计与分析基础
莱维丁 (Anany Levitin) / 清华大学出版社 / 2013-5-1 / CNY 79.00
《算法设计与分析基础(第3版 影印版)》在讲述算法设计技术时采用了新的分类方法,在讨论分析方法时条分缕析,形成了连贯有序、耳目一新的风格。为便于学生掌握,本书涵盖算法入门课程的全部内容,更注重对概念(而非形式)的理解。书中通过一些流行的谜题来激发学生的兴趣,帮助他们加强和提高解决算法问题的能力。每章小结、习题提示和详细解答,形成了非常鲜明的教学特色。 《算法设计与分析基础(第3版 影印版)》......一起来看看 《算法设计与分析基础》 这本书的介绍吧!