readability v0.9.0 Readability.Helper

Helpers for parsing, updating, removing html tree

Link to this section Summary

Functions

Check html_tree can be candidate or not

Change existing tags by selector

Normalize and Parse to html tree(tuple or list)) from binary html

Remove html attributes

Count only text length

Link to this section Types

Link to this type html_tree()
html_tree() :: tuple | list

Link to this section Functions

Link to this function candidate_tag?(html_tree)
candidate_tag?(html_tree) :: boolean

Check html_tree can be candidate or not.

Link to this function change_tag(content, selector, tag)

Change existing tags by selector

Link to this function normalize(raw_html)
normalize(binary) :: html_tree

Normalize and Parse to html tree(tuple or list)) from binary html

Link to this function remove_attrs(content, t_attrs)
remove_attrs(html_tree, String.t | [String.t] | Regex.t) :: html_tree

Remove html attributes

Link to this function remove_tag(content, fun)
remove_tag(html_tree, (... -> any)) :: html_tree

Remove tags

Link to this function text_length(html_tree)
text_length(html_tree) :: number

Count only text length