Browse the docs

Extract links, a table or the article

Pulls a known shape out of a page: its links, images, first table, meta tags, structured data, readable article or the article as Markdown.

Extract the kind from the page

Details #

kind is:

  • links: a list of {text, href}.

  • images: {src, alt}.

  • table: a list of dictionaries from the first table (or the one at selector), keyed by its header cells.

  • meta: description, Open Graph tags, the canonical address.

  • jsonld: the page's structured data.

  • article: {title, byline, text}, the reader-mode text.

  • markdown: the article as Markdown.

  • feed: the page's RSS, Atom or JSON feed as [{title, url, date, author, summary}], found through <link rel="alternate">, or the page itself when it is one.

  • list: the page's main repeating list as rows, the same as Scrape a page into rows with no selector.

selector limits it to one part of the page.

Parameters #

ParameterTypeRequiredValuesWhat it does
kindone ofYeslinks images table meta jsonld article markdown feed listRequired.
browserone ofsafari chrome front
htmltext
impersonateone ofauto chrome safari none
intotextThe variable that receives the result.
sampleany value
selectortextOnly this part.
signIntext
tabany value
timeoutnumber, tab.
urltext, html, via, signIn, impersonate: Read a page nobody has open: url is fetched the way a browser would (via: fetch, the default) or opened in a background tab (via: tab); html is a string such as {{ res.body }}.
viaone ofauto extension appleScript fetch tab

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Copy the article as Markdown
Do
  1. Extract the markdown from the page
  2. Read the clipboard
Open in Switchboard to try it

Gotchas #

  • The article is a good guess, not a promise: a page with no clear article may give the largest block of text.