Browse Source

temp commit

master
boB Rudis 7 years ago
parent
commit
5c55cfe338
  1. 1
      NAMESPACE
  2. 8
      R/aaa.r
  3. 41
      R/render-har.r
  4. 73
      R/render-html.r
  5. 31
      R/render-jpg.r
  6. 33
      R/render-png.r
  7. 61
      man/render_har.Rd
  8. 50
      man/render_html.Rd
  9. 42
      man/render_jpeg.Rd
  10. 44
      man/render_png.Rd

1
NAMESPACE

@ -3,6 +3,7 @@
S3method(print,splash_debug)
S3method(print,splash_status)
export("%>%")
export(render_har)
export(render_html)
export(render_jpeg)
export(render_png)

8
R/aaa.r

@ -0,0 +1,8 @@
trunc_string <- function (x, maxlen = 20, justify = "left") {
toolong <- nzchar(x) > maxlen
maxwidth <- ifelse(toolong, maxlen - 3, maxlen)
chopx <- substr(x, 1, maxwidth)
lenx <- length(x)
for (i in 1:length(x)) if (toolong[i]) chopx[i] <- paste(chopx[i], "...", sep = "")
return(formatC(chopx, width = maxlen, flag = ifelse(justify == "left", "-", " ")))
}

41
R/render-har.r

@ -0,0 +1,41 @@
#' Return information about Splash interaction with a website in HAR format.
#'
#' It includes information about requests made, responses received, timings, headers, etc and
#' is incredibly detailed, full of information on every componenent loaded.
#'
#' @md
#' @param response_body When `TRUE`, response content is included in the HAR records
#' @inheritParams render_html
#' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html)
#' @export
render_har <- function(splash_obj, url, base_url, response_body=FALSE, timeout=30, resource_timeout, wait=0,
proxy, js, js_src, filters, allowed_domains, allowed_content_types,
forbidden_content_types, viewport="1024x768", images, headers, body,
http_method, save_args, load_args) {
params <- list(url=url, timeout=timeout, wait=wait, viewport=viewport,
response_body=as.numeric(response_body))
if (!missing(base_url)) params$base_url <- base_url
if (!missing(resource_timeout)) params$resource_timeout <- resource_timeout
if (!missing(proxy)) proxy$base_url <- proxy
if (!missing(js)) params$js <- js
if (!missing(js_src)) params$js_src <- js_src
if (!missing(filters)) params$filters <- filters
if (!missing(allowed_domains)) params$allowed_domains <- allowed_domains
if (!missing(allowed_content_types)) params$allowed_content_types <- allowed_content_types
if (!missing(forbidden_content_types)) params$forbidden_content_types <- forbidden_content_types
if (!missing(images)) params$images <- images
if (!missing(headers)) params$headers <- headers
if (!missing(body)) params$body <- body
if (!missing(http_method)) params$http_method <- http_method
if (!missing(save_args)) params$save_args <- save_args
if (!missing(load_args)) params$load_args <- load_args
res <- httr::GET(splash_url(splash_obj), path="render.har", encode="json", query=params)
httr::stop_for_status(res)
httr::content(res, as="text", encoding="UTF-8")
}

73
R/render-html.r

@ -5,37 +5,62 @@
#' @md
#' @param splash_obj Object created by a call to [splash]
#' @param url The URL to render (required)
#' @param base_url TBD The base url to render the page with.
#' @param timeout TBD A timeout (in seconds) for the render (defaults to 30).
#' @param base_url The base url to render the page with.
#' @param timeout A timeout (in seconds) for the render (defaults to 30).
#' @param resource_timeout A timeout (in seconds) for individual network requests.
#' @param wait Time (in seconds) to wait for updates after page is loaded (defaults to 0).
#' @param proxy TBD Proxy profile name or proxy URL.
#' @param js TBD Javascript profile name.
#' @param js_src TBD JavaScript code to be executed in page context.
#' @param filters TBD Comma-separated list of request filter names.
#' @param allowed_domains TBD 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.
#' @param allowed_content_types TBD Comma-separated list of allowed content types. If present, Splash will abort any request if the response’s content type doesn’t match any of the content types in this list. Wildcards are supported.
#' @param forbidden_content_types TBD Comma-separated list of forbidden content types. If present, Splash will abort any request if the response’s content type matches any of the content types in this list. Wildcards are supported.
#' @param proxy Proxy profile name or proxy URL.
#' @param js Javascript profile name.
#' @param js_src JavaScript code to be executed in page context.
#' @param filters Comma-separated list of request filter names.
#' @param 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.
#' @param allowed_content_types Comma-separated list of allowed content types. If present, Splash will abort any request if the response’s content type doesn’t match any of the content types in this list. Wildcards are supported.
#' @param forbidden_content_types Comma-separated list of forbidden content types. If present, Splash will abort any request if the response’s content type matches any of the content types in this list. Wildcards are supported.
#' @param viewport View width and height (in pixels) of the browser viewport to render the web page. Format is “<width>x<height>”, e.g. 800x600. Default value is 1024x768.
#' @param images TBD Whether to download images.
#' @param headers TBD HTTP headers to set for the first outgoing request.
#' @param body TBD Body of HTTP POST request to be sent if method is POST.
#' @param http_method TBD HTTP method of outgoing Splash request.
#' @param save_args TBD A list of argument names to put in cache.
#' @param load_args TBD Parameter values to load from cache
#' @param images Whether to download images.
#' @param headers HTTP headers to set for the first outgoing request.
#' @param body Body of HTTP POST request to be sent if method is POST.
#' @param http_method HTTP method of outgoing Splash request.
#' @param save_args A list of argument names to put in cache.
#' @param load_args Parameter values to load from cache
#' @param raw_html if `TRUE` then return a character vector vs an XML document. Only valid for `render_html`
#' @return An XML document. Note that this is processed by [xml2::read_html] so it will not be
#' the pristine, raw, rendered HTML from the site. Use `raw_html=TRUE` if you do not want it
#' to be processed first by `xml2`. If you choose `raw_html=TRUE` you'll get back a
#' character vector.
#' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html)
#' @export
render_html <- function(splash_obj, url, base_url, timeout=30, resource_timeout=NULL, wait=0,
proxy, js, js_src, filters, allowed_domains="", allowed_content_types="",
forbidden_content_types="", viewport="1024x768", images, headers, body,
http_method, save_args, load_args) {
render_html <- function(splash_obj, url, base_url, timeout=30, resource_timeout, wait=0,
proxy, js, js_src, filters, allowed_domains, allowed_content_types,
forbidden_content_types, viewport="1024x768", images, headers, body,
http_method, save_args, load_args, raw_html=FALSE) {
res <- httr::GET(splash_url(splash_obj), path="render.html",
encode="json",
query=list(url=url, timeout=timeout, wait=wait, viewport=viewport))
params <- list(url=url, timeout=timeout, wait=wait, viewport=viewport)
if (!missing(base_url)) params$base_url <- base_url
if (!missing(resource_timeout)) params$resource_timeout <- resource_timeout
if (!missing(proxy)) proxy$base_url <- proxy
if (!missing(js)) params$js <- js
if (!missing(js_src)) params$js_src <- js_src
if (!missing(filters)) params$filters <- filters
if (!missing(allowed_domains)) params$allowed_domains <- allowed_domains
if (!missing(allowed_content_types)) params$allowed_content_types <- allowed_content_types
if (!missing(forbidden_content_types)) params$forbidden_content_types <- forbidden_content_types
if (!missing(images)) params$images <- images
if (!missing(headers)) params$headers <- headers
if (!missing(body)) params$body <- body
if (!missing(http_method)) params$http_method <- http_method
if (!missing(save_args)) params$save_args <- save_args
if (!missing(load_args)) params$load_args <- load_args
res <- httr::GET(splash_url(splash_obj), path="render.html", encode="json", query=params)
httr::stop_for_status(res)
httr::content(res, as="text", encoding="UTF-8") %>%
xml2::read_html()
out <- httr::content(res, as="text", encoding="UTF-8")
if (!raw_html) out <- xml2::read_html(out)
out
}

31
R/render-jpg.r

@ -4,17 +4,34 @@
#' @param quality JPEG quality parameter in range from 0 to 100. Default is quality=75.
#' @inheritParams render_html
#' @inheritParams render_png
#' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html)
#' @export
render_jpeg <- function(splash_obj, url, base_url=NULL, quality=75, width=1024, height=768,
timeout=30, resource_timeout=NULL, wait=0, render_all=FALSE,
proxy, js, js_src, filters, allowed_domains="", allowed_content_types="",
forbidden_content_types="", viewport="1024x768", images, headers, body,
timeout=30, resource_timeout, wait=0, render_all=FALSE,
proxy, js, js_src, filters, allowed_domains, allowed_content_types,
forbidden_content_types, viewport="1024x768", images, headers, body,
http_method, save_args, load_args) {
res <- httr::GET(splash_url(splash_obj), path="render.jpeg",
encode="json",
query=list(url=url, timeout=timeout, wait=wait, viewport=viewport,
quality=quality, width=width, height=height, render_all=as.numeric(render_all)))
params <- list(url=url, timeout=timeout, wait=wait, viewport=viewport,
quality=quality, width=width, height=height, render_all=as.numeric(render_all))
if (!missing(base_url)) params$base_url <- base_url
if (!missing(resource_timeout)) params$resource_timeout <- resource_timeout
if (!missing(proxy)) proxy$base_url <- proxy
if (!missing(js)) params$js <- js
if (!missing(js_src)) params$js_src <- js_src
if (!missing(filters)) params$filters <- filters
if (!missing(allowed_domains)) params$allowed_domains <- allowed_domains
if (!missing(allowed_content_types)) params$allowed_content_types <- allowed_content_types
if (!missing(forbidden_content_types)) params$forbidden_content_types <- forbidden_content_types
if (!missing(images)) params$images <- images
if (!missing(headers)) params$headers <- headers
if (!missing(body)) params$body <- body
if (!missing(http_method)) params$http_method <- http_method
if (!missing(save_args)) params$save_args <- save_args
if (!missing(load_args)) params$load_args <- load_args
res <- httr::GET(splash_url(splash_obj), path="render.jpeg", encode="json", query=params)
httr::stop_for_status(res)

33
R/render-png.r

@ -3,18 +3,35 @@
#' @md
#' @param width,height Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio.
#' @param render_all If `TRUE` extend the viewport to include the whole webpage (possibly very tall) before rendering. Default is `FASLE`
#' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html)
#' @inheritParams render_html
#' @export
render_png <- function(splash_obj, url, base_url=NULL, width=1024, height=768, render_all=FALSE,
timeout=30, resource_timeout=NULL, wait=0,
proxy, js, js_src, filters, allowed_domains="", allowed_content_types="",
forbidden_content_types="", viewport="1024x768", images, headers, body,
render_png <- function(splash_obj, url, base_url, width=1024, height=768, render_all=FALSE,
timeout=30, resource_timeout, wait=0,
proxy, js, js_src, filters, allowed_domains, allowed_content_types,
forbidden_content_types, viewport="1024x768", images, headers, body,
http_method, save_args, load_args) {
res <- httr::GET(splash_url(splash_obj), path="render.png",
encode="json",
query=list(url=url, timeout=timeout, wait=wait, viewport=viewport,
width=width, height=height, render_all=as.numeric(render_all)))
params <- list(url=url, timeout=timeout, wait=wait, viewport=viewport,
width=width, height=height, render_all=as.numeric(render_all))
if (!missing(base_url)) params$base_url <- base_url
if (!missing(resource_timeout)) params$resource_timeout <- resource_timeout
if (!missing(proxy)) proxy$base_url <- proxy
if (!missing(js)) params$js <- js
if (!missing(js_src)) params$js_src <- js_src
if (!missing(filters)) params$filters <- filters
if (!missing(allowed_domains)) params$allowed_domains <- allowed_domains
if (!missing(allowed_content_types)) params$allowed_content_types <- allowed_content_types
if (!missing(forbidden_content_types)) params$forbidden_content_types <- forbidden_content_types
if (!missing(images)) params$images <- images
if (!missing(headers)) params$headers <- headers
if (!missing(body)) params$body <- body
if (!missing(http_method)) params$http_method <- http_method
if (!missing(save_args)) params$save_args <- save_args
if (!missing(load_args)) params$load_args <- load_args
res <- httr::GET(splash_url(splash_obj), path="render.png", encode="json", query=params)
httr::stop_for_status(res)

61
man/render_har.Rd

@ -0,0 +1,61 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render-har.r
\name{render_har}
\alias{render_har}
\title{Return information about Splash interaction with a website in HAR format.}
\usage{
render_har(splash_obj, url, base_url, response_body = FALSE, timeout = 30,
resource_timeout, wait = 0, proxy, js, js_src, filters, allowed_domains,
allowed_content_types, forbidden_content_types, viewport = "1024x768",
images, headers, body, http_method, save_args, load_args)
}
\arguments{
\item{splash_obj}{Object created by a call to \link{splash}}
\item{url}{The URL to render (required)}
\item{base_url}{The base url to render the page with.}
\item{response_body}{When \code{TRUE}, response content is included in the HAR records}
\item{timeout}{A timeout (in seconds) for the render (defaults to 30).}
\item{resource_timeout}{A timeout (in seconds) for individual network requests.}
\item{wait}{Time (in seconds) to wait for updates after page is loaded (defaults to 0).}
\item{proxy}{Proxy profile name or proxy URL.}
\item{js}{Javascript profile name.}
\item{js_src}{JavaScript code to be executed in page context.}
\item{filters}{Comma-separated list of request filter names.}
\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{allowed_content_types}{Comma-separated list of allowed content types. If present, Splash will abort any request if the response’s content type doesn’t match any of the content types in this list. Wildcards are supported.}
\item{forbidden_content_types}{Comma-separated list of forbidden content types. If present, Splash will abort any request if the response’s content type matches any of the content types in this list. Wildcards are supported.}
\item{viewport}{View width and height (in pixels) of the browser viewport to render the web page. Format is “<width>x<height>”, e.g. 800x600. Default value is 1024x768.}
\item{images}{Whether to download images.}
\item{headers}{HTTP headers to set for the first outgoing request.}
\item{body}{Body of HTTP POST request to be sent if method is POST.}
\item{http_method}{HTTP method of outgoing Splash request.}
\item{save_args}{A list of argument names to put in cache.}
\item{load_args}{Parameter values to load from cache}
}
\description{
It includes information about requests made, responses received, timings, headers, etc and
is incredibly detailed, full of information on every componenent loaded.
}
\references{
\href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs}
}

50
man/render_html.Rd

@ -4,53 +4,63 @@
\alias{render_html}
\title{Return the HTML of the javascript-rendered page.}
\usage{
render_html(splash_obj, url, base_url, timeout = 30,
resource_timeout = NULL, wait = 0, proxy, js, js_src, filters,
allowed_domains = "", allowed_content_types = "",
forbidden_content_types = "", viewport = "1024x768", images, headers,
body, http_method, save_args, load_args)
render_html(splash_obj, url, base_url, timeout = 30, resource_timeout,
wait = 0, proxy, js, js_src, filters, allowed_domains,
allowed_content_types, forbidden_content_types, viewport = "1024x768",
images, headers, body, http_method, save_args, load_args, raw_html = FALSE)
}
\arguments{
\item{splash_obj}{Object created by a call to \link{splash}}
\item{url}{The URL to render (required)}
\item{base_url}{TBD The base url to render the page with.}
\item{base_url}{The base url to render the page with.}
\item{timeout}{TBD A timeout (in seconds) for the render (defaults to 30).}
\item{timeout}{A timeout (in seconds) for the render (defaults to 30).}
\item{resource_timeout}{A timeout (in seconds) for individual network requests.}
\item{wait}{Time (in seconds) to wait for updates after page is loaded (defaults to 0).}
\item{proxy}{TBD Proxy profile name or proxy URL.}
\item{proxy}{Proxy profile name or proxy URL.}
\item{js}{TBD Javascript profile name.}
\item{js}{Javascript profile name.}
\item{js_src}{TBD JavaScript code to be executed in page context.}
\item{js_src}{JavaScript code to be executed in page context.}
\item{filters}{TBD Comma-separated list of request filter names.}
\item{filters}{Comma-separated list of request filter names.}
\item{allowed_domains}{TBD 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{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{allowed_content_types}{TBD Comma-separated list of allowed content types. If present, Splash will abort any request if the response’s content type doesn’t match any of the content types in this list. Wildcards are supported.}
\item{allowed_content_types}{Comma-separated list of allowed content types. If present, Splash will abort any request if the response’s content type doesn’t match any of the content types in this list. Wildcards are supported.}
\item{forbidden_content_types}{TBD Comma-separated list of forbidden content types. If present, Splash will abort any request if the response’s content type matches any of the content types in this list. Wildcards are supported.}
\item{forbidden_content_types}{Comma-separated list of forbidden content types. If present, Splash will abort any request if the response’s content type matches any of the content types in this list. Wildcards are supported.}
\item{viewport}{View width and height (in pixels) of the browser viewport to render the web page. Format is “<width>x<height>”, e.g. 800x600. Default value is 1024x768.}
\item{images}{TBD Whether to download images.}
\item{images}{Whether to download images.}
\item{headers}{TBD HTTP headers to set for the first outgoing request.}
\item{headers}{HTTP headers to set for the first outgoing request.}
\item{body}{TBD Body of HTTP POST request to be sent if method is POST.}
\item{body}{Body of HTTP POST request to be sent if method is POST.}
\item{http_method}{TBD HTTP method of outgoing Splash request.}
\item{http_method}{HTTP method of outgoing Splash request.}
\item{save_args}{TBD A list of argument names to put in cache.}
\item{save_args}{A list of argument names to put in cache.}
\item{load_args}{TBD Parameter values to load from cache}
\item{load_args}{Parameter values to load from cache}
\item{raw_html}{if \code{TRUE} then return a character vector vs an XML document. Only valid for \code{render_html}}
}
\value{
An XML document. Note that this is processed by \link[xml2:read_html]{xml2::read_html} so it will not be
the pristine, raw, rendered HTML from the site. Use \code{raw_html=TRUE} if you do not want it
to be processed first by \code{xml2}. If you choose \code{raw_html=TRUE} you'll get back a
character vector.
}
\description{
Similar to \code{rvest::read_html}.
}
\references{
\href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs}
}

42
man/render_jpeg.Rd

@ -5,18 +5,17 @@
\title{Return a image (in JPEG format) of the javascript-rendered page.}
\usage{
render_jpeg(splash_obj, url, base_url = NULL, quality = 75, width = 1024,
height = 768, timeout = 30, resource_timeout = NULL, wait = 0,
render_all = FALSE, proxy, js, js_src, filters, allowed_domains = "",
allowed_content_types = "", forbidden_content_types = "",
viewport = "1024x768", images, headers, body, http_method, save_args,
load_args)
height = 768, timeout = 30, resource_timeout, wait = 0,
render_all = FALSE, proxy, js, js_src, filters, allowed_domains,
allowed_content_types, forbidden_content_types, viewport = "1024x768",
images, headers, body, http_method, save_args, load_args)
}
\arguments{
\item{splash_obj}{Object created by a call to \link{splash}}
\item{url}{The URL to render (required)}
\item{base_url}{TBD The base url to render the page with.}
\item{base_url}{The base url to render the page with.}
\item{quality}{JPEG quality parameter in range from 0 to 100. Default is quality=75.}
@ -24,7 +23,7 @@ render_jpeg(splash_obj, url, base_url = NULL, quality = 75, width = 1024,
\item{height}{Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio.}
\item{timeout}{TBD A timeout (in seconds) for the render (defaults to 30).}
\item{timeout}{A timeout (in seconds) for the render (defaults to 30).}
\item{resource_timeout}{A timeout (in seconds) for individual network requests.}
@ -32,34 +31,37 @@ render_jpeg(splash_obj, url, base_url = NULL, quality = 75, width = 1024,
\item{render_all}{If \code{TRUE} extend the viewport to include the whole webpage (possibly very tall) before rendering. Default is \code{FASLE}}
\item{proxy}{TBD Proxy profile name or proxy URL.}
\item{proxy}{Proxy profile name or proxy URL.}
\item{js}{TBD Javascript profile name.}
\item{js}{Javascript profile name.}
\item{js_src}{TBD JavaScript code to be executed in page context.}
\item{js_src}{JavaScript code to be executed in page context.}
\item{filters}{TBD Comma-separated list of request filter names.}
\item{filters}{Comma-separated list of request filter names.}
\item{allowed_domains}{TBD 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{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{allowed_content_types}{TBD Comma-separated list of allowed content types. If present, Splash will abort any request if the response’s content type doesn’t match any of the content types in this list. Wildcards are supported.}
\item{allowed_content_types}{Comma-separated list of allowed content types. If present, Splash will abort any request if the response’s content type doesn’t match any of the content types in this list. Wildcards are supported.}
\item{forbidden_content_types}{TBD Comma-separated list of forbidden content types. If present, Splash will abort any request if the response’s content type matches any of the content types in this list. Wildcards are supported.}
\item{forbidden_content_types}{Comma-separated list of forbidden content types. If present, Splash will abort any request if the response’s content type matches any of the content types in this list. Wildcards are supported.}
\item{viewport}{View width and height (in pixels) of the browser viewport to render the web page. Format is “<width>x<height>”, e.g. 800x600. Default value is 1024x768.}
\item{images}{TBD Whether to download images.}
\item{images}{Whether to download images.}
\item{headers}{TBD HTTP headers to set for the first outgoing request.}
\item{headers}{HTTP headers to set for the first outgoing request.}
\item{body}{TBD Body of HTTP POST request to be sent if method is POST.}
\item{body}{Body of HTTP POST request to be sent if method is POST.}
\item{http_method}{TBD HTTP method of outgoing Splash request.}
\item{http_method}{HTTP method of outgoing Splash request.}
\item{save_args}{TBD A list of argument names to put in cache.}
\item{save_args}{A list of argument names to put in cache.}
\item{load_args}{TBD Parameter values to load from cache}
\item{load_args}{Parameter values to load from cache}
}
\description{
Return a image (in JPEG format) of the javascript-rendered page.
}
\references{
\href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs}
}

44
man/render_png.Rd

@ -4,58 +4,60 @@
\alias{render_png}
\title{Return a image (in PNG format) of the javascript-rendered page.}
\usage{
render_png(splash_obj, url, base_url = NULL, width = 1024, height = 768,
render_all = FALSE, timeout = 30, resource_timeout = NULL, wait = 0,
proxy, js, js_src, filters, allowed_domains = "",
allowed_content_types = "", forbidden_content_types = "",
viewport = "1024x768", images, headers, body, http_method, save_args,
load_args)
render_png(splash_obj, url, base_url, width = 1024, height = 768,
render_all = FALSE, timeout = 30, resource_timeout, wait = 0, proxy, js,
js_src, filters, allowed_domains, allowed_content_types,
forbidden_content_types, viewport = "1024x768", images, headers, body,
http_method, save_args, load_args)
}
\arguments{
\item{splash_obj}{Object created by a call to \link{splash}}
\item{url}{The URL to render (required)}
\item{base_url}{TBD The base url to render the page with.}
\item{base_url}{The base url to render the page with.}
\item{width, height}{Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio.}
\item{render_all}{If \code{TRUE} extend the viewport to include the whole webpage (possibly very tall) before rendering. Default is \code{FASLE}}
\item{timeout}{TBD A timeout (in seconds) for the render (defaults to 30).}
\item{timeout}{A timeout (in seconds) for the render (defaults to 30).}
\item{resource_timeout}{A timeout (in seconds) for individual network requests.}
\item{wait}{Time (in seconds) to wait for updates after page is loaded (defaults to 0).}
\item{proxy}{TBD Proxy profile name or proxy URL.}
\item{proxy}{Proxy profile name or proxy URL.}
\item{js}{TBD Javascript profile name.}
\item{js}{Javascript profile name.}
\item{js_src}{TBD JavaScript code to be executed in page context.}
\item{js_src}{JavaScript code to be executed in page context.}
\item{filters}{TBD Comma-separated list of request filter names.}
\item{filters}{Comma-separated list of request filter names.}
\item{allowed_domains}{TBD 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{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{allowed_content_types}{TBD Comma-separated list of allowed content types. If present, Splash will abort any request if the response’s content type doesn’t match any of the content types in this list. Wildcards are supported.}
\item{allowed_content_types}{Comma-separated list of allowed content types. If present, Splash will abort any request if the response’s content type doesn’t match any of the content types in this list. Wildcards are supported.}
\item{forbidden_content_types}{TBD Comma-separated list of forbidden content types. If present, Splash will abort any request if the response’s content type matches any of the content types in this list. Wildcards are supported.}
\item{forbidden_content_types}{Comma-separated list of forbidden content types. If present, Splash will abort any request if the response’s content type matches any of the content types in this list. Wildcards are supported.}
\item{viewport}{View width and height (in pixels) of the browser viewport to render the web page. Format is “<width>x<height>”, e.g. 800x600. Default value is 1024x768.}
\item{images}{TBD Whether to download images.}
\item{images}{Whether to download images.}
\item{headers}{TBD HTTP headers to set for the first outgoing request.}
\item{headers}{HTTP headers to set for the first outgoing request.}
\item{body}{TBD Body of HTTP POST request to be sent if method is POST.}
\item{body}{Body of HTTP POST request to be sent if method is POST.}
\item{http_method}{TBD HTTP method of outgoing Splash request.}
\item{http_method}{HTTP method of outgoing Splash request.}
\item{save_args}{TBD A list of argument names to put in cache.}
\item{save_args}{A list of argument names to put in cache.}
\item{load_args}{TBD Parameter values to load from cache}
\item{load_args}{Parameter values to load from cache}
}
\description{
Return a image (in PNG format) of the javascript-rendered page.
}
\references{
\href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs}
}

Loading…
Cancel
Save