Tools to Work with the 'Splash' JavaScript Rendering Service in R
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.

61 lines
1.9 KiB

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/execute.r
\title{Execute a custom rendering script and return a result.}
execute_lua(splash_obj, lua_source, timeout = 30, allowed_domains, proxy,
filters, save_args, load_args)
\item{splash_obj}{Object created by a call to \code{\link[=splash]{splash()}}}
\item{lua_source}{Browser automation script. See \href{}{Splash Script} Tutorial for more info.}
6 years ago
\item{timeout}{A timeout (in seconds) for the render (defaults to 30). Without
reconfiguring the startup parameters of the Splash server (not this package)
the maximum allowed value for the timeout is 60 seconds.}
6 years ago
\item{allowed_domains}{Comma-separated list of allowed domain names. If present, Splash
won’t load anything neither from domains not in this list nor from subdomains of
domains not in this list.}
\item{proxy}{Proxy profile name or proxy URL.}
\item{filters}{Comma-separated list of request filter names.}
\item{save_args}{A list of argument names to put in cache.}
\item{load_args}{Parameter values to load from cache}
6 years ago
\code{raw} content from the \code{httr} call. Given the vast diversity of possible return
values, it's up to the caller to handle the return value.
Execute a custom rendering script and return a result.
splash_local \%>\%
function main(splash)
return splash:evaljs("memberScores")
') -> res
rawToChar(res) \%>\%
jsonlite::fromJSON(flatten=TRUE) \%>\%
purrr::map(tibble::as_tibble) -> member_scores
6 years ago
Other splash_renderers: \code{\link{render_har}},
\code{\link{render_html}}, \code{\link{render_jpeg}},
\code{\link{render_json}}, \code{\link{render_png}}
6 years ago