Created
January 28, 2019 18:43
-
-
Save buley/6fe57bca09d8c469425b771866633021 to your computer and use it in GitHub Desktop.
Readability - docs example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Readability = require('Readability'); | |
var JSDOM = require('jsdom').JSDOM; | |
var doc = new JSDOM("<body>Here's a bunch of text</body>", { | |
url: "https://www.example.com/the-page-i-got-the-source-from", | |
}); | |
let reader = new Readability(doc); | |
let article = reader.parse(); |
Author
buley
commented
Jan 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment