mirror of https://git.sr.ht/~hrbrmstr/crux
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
928 B
36 lines
928 B
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/summarise.R
|
|
\name{summarise_url}
|
|
\alias{summarise_url}
|
|
\title{Summarise the contents at a URL to essential bits}
|
|
\usage{
|
|
summarise_url(x)
|
|
}
|
|
\arguments{
|
|
\item{x}{URL}
|
|
}
|
|
\description{
|
|
Fetches the HTML from \code{x} and returns the essential components
|
|
including:
|
|
\itemize{
|
|
\item \code{url}
|
|
\item \code{original_url}
|
|
\item \code{title}
|
|
\item \code{description}
|
|
\item \code{site_name}
|
|
\item \code{theme_color}
|
|
\item \code{amp_url}
|
|
\item \code{canonical_url}
|
|
\item \code{image_url}
|
|
\item \code{video_url}
|
|
\item \code{feed_url}
|
|
\item \code{favicon_url}
|
|
\item \code{reading_time}
|
|
\item \code{text} (the reducted, plain text)
|
|
If any compontents cannot be derived from the contents of the URL they will be \code{NA}.
|
|
}
|
|
}
|
|
\examples{
|
|
ex_url <- "https://techcrunch.com/2019/02/28/thailand-passes-controversial-cybersecurity-law/"
|
|
str(summarise_url(ex_url), 1)
|
|
}
|
|
|