Readability.Candidate.Cleaner (readability2 v0.7.0)

Clean html tree for prepare candidates. It transforms misused tags and removes unlikely candidates.

Link to this section Summary

Functions

Remove unlikely html tree

Transform misused divs <div>s that do not contain other block elements into <p>s

Link to this section Types

@type html_tree() :: tuple() | list()

Link to this section Functions

Link to this function

remove_unlikely_tree(html_tree)

@spec remove_unlikely_tree(html_tree()) :: html_tree()

Remove unlikely html tree

Link to this function

transform_misused_div_to_p(content)

@spec transform_misused_div_to_p(html_tree()) :: html_tree()

Transform misused divs <div>s that do not contain other block elements into <p>s