readability v0.7.0 Readability.Helper

Helpers for parsing, updating, removing html tree

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

Types

html_tree()
html_tree() :: tuple | list

Functions

candidate_tag?(html_tree)
candidate_tag?(html_tree) :: boolean

Check html_tree can be candidate or not.

change_tag(content, selector, tag)

Change existing tags by selector

normalize(raw_html)
normalize(binary) :: html_tree

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

remove_attrs(content, t_attrs)
remove_attrs(html_tree, String.t | [String.t] | Regex.t) :: html_tree

Remove html attributes

remove_tag(content, fun)
remove_tag(html_tree, (... -> any)) :: html_tree

Remove tags

text_length(html_tree)
text_length(html_tree) :: number

Count only text length