LinkFollowability
Classifies links the way search engines read them: every rel token on every
anchor, plus the page-level <meta name="robots"> and X-Robots-Tag header.
Google treats nofollow, ugc and sponsored as hints that a link should not
be followed, and more than one of them can sit on the same anchor. noopener
and noreferrer are browser-security tokens and do not change followability.
Constants
rel tokens that mark a link as not followed.
Class methods
Extracts every <a> start tag with an href, in document order. Handles
double-quoted, single-quoted and unquoted attribute values. Anchors without
an href are skipped. This is a tokenizer for start tags, not a full HTML
parser: comments and script bodies are removed first so that markup inside
them is not counted.
Whether a given anchor is followed once page-level directives are applied.
Merges several directive sets; any noindex/nofollow wins.
Returns the content of the first <meta name="robots"> tag, or nil.
Parses a robots directive list such as "noindex, nofollow" or "none".
none is equivalent to noindex, nofollow; all sets neither.
Parses one X-Robots-Tag header value. A value may be scoped to a crawler
("googlebot: noindex"); scoped values only apply when user_agent matches
(case-insensitive). Unscoped values apply to every crawler. Directives that
carry their own value after a colon (e.g. "unavailable_after: ...") are not
mistaken for a crawler scope.