View Source Readability.Queries (readability v0.12.1)

Highly-optimized utilities for quick answers about HTML tree

Summary

Functions

Finds number of occurences of a given character, much faster than converting to text

Finds given tags in HTML tree, much faster than using generic selector

Count only text length.

Types

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

Functions

Link to this function

cache_stats_in_attributes(html_tree)

View Source
Link to this function

clear_stats_from_attributes(html_tree)

View Source
Link to this function

count_character(nodes, char)

View Source
@spec count_character(html_tree(), binary()) :: number()

Finds number of occurences of a given character, much faster than converting to text

Link to this function

find_tag(html_tree, tag)

View Source
@spec find_tag(html_tree(), binary()) :: list()

Finds given tags in HTML tree, much faster than using generic selector

Link to this function

find_tag_internal(nodes, tag)

View Source
@spec text_length(html_tree()) :: number()

Count only text length.