% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/page_signals.R
\name{page_signals}
\alias{page_signals}
\title{What kind of page is this?}
\usage{
page_signals(html, text = NULL, domain = "", status = NULL)
}
\arguments{
\item{html}{Raw response body.}

\item{text}{Extracted page text. If `NULL`, derived from `html`.}

\item{domain}{The domain requested, used to spot a page whose only content is its own
name.}

\item{status}{HTTP status code, if known.}
}
\value{
A one-row tibble: `page_state` (one of `"content"`, `"blocked"`, `"parked"`,
  `"unavailable"`, `"thin"`), `blocked`, `block_vendor`, `block_reason`, `parked`,
  `unavailable`, `thin`, `n_tokens`.
}
\description{
Inspects already-fetched HTML for the three things that are not a classifiable site: an
anti-bot interstitial, a domain-parking placeholder, and a server's "nothing here"
page. No network access.
}
\details{
`parked` and `unavailable` are **answers, not failures** -- they are facts about the
domain, plainly stated in the page, that a caller can act on. They are also free: no
classification service needs to be consulted.
}
\examples{
# A Cloudflare challenge, not a website
page_signals("<html><title>Just a moment...</title><body>cf_chl_opt</body></html>")

# A parking page
page_signals("<html><body>This domain is for sale. Inquire now.</body></html>")

# A real page that merely embeds reCAPTCHA is not blocked
page_signals(paste0("<html><title>Reddit</title><body>",
                    paste(rep("real discussion content", 200), collapse = " "),
                    "<script src='recaptcha/api.js'></script></body></html>"))
}
\seealso{
[fetch_error_codes()] for how these map onto run outcomes.
}
