Perplexed.Document (Perplexed v0.1.0)

Copy Markdown View Source

One scraped page as Markdown, with how it was obtained.

tier names the Perplexed.Scraper that produced readable text (a built-in name such as :direct, or a custom scraper's module). attempts lists every rung tried, in order, with its outcome, so a run shows where the ladder escalated. browser_ms is Browser Run time when that rung ran. cost is the USD cost of the rung that produced the document (0.0 for the free direct and impersonated rungs).

Summary

Types

outcome()

@type outcome() :: Perplexed.Verdict.t() | atom()

t()

@type t() :: %Perplexed.Document{
  attempts: [{tier(), outcome()}],
  browser_ms: non_neg_integer(),
  content_type: String.t() | nil,
  cost: float(),
  final_url: String.t() | nil,
  markdown: String.t(),
  tier: tier(),
  url: String.t()
}

tier()

@type tier() :: atom()