1.5.9 • Published 4 years ago

cleanview v1.5.9

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

cleanview

Clean the content of html articles, same job as services like Instapaper/Readability.

It doesn't use DOM or Virtual DOM in the process.

Usage:

var cleanview = require('cleanview');
var output = cleanview(ARTICLE_HTML, { url: ARTICLE_URL }); // url is optional

Optional Parameters:

  • minRatio: (default value is 0.75) a number between 0 and 1 which determinate the ratio of <p> tags a container should have to be considered the "main" article body, this ratio is compared against all the <p> tags inside the page, that means, if the container have at least 75% of all the <p> tags in the page, this will be the main container, if not, his parent container will be checked for if it fulfills the desired ratio.

  • includeTags: Tags to include in the content search, you can check the default tag list on defaults/valid-tags.js.

  • forbiddenClasses: Classes to exclude from the conent search, you can check the default class list on defaults/forbidden-classes.js.

1.5.9

4 years ago

1.5.8

4 years ago

1.5.5

4 years ago

1.5.7

4 years ago

1.5.6

4 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago