diff --git a/NAMESPACE b/NAMESPACE index a9c20b0..ac48985 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -47,6 +47,7 @@ export(splash_active) export(splash_add_lua) export(splash_click) export(splash_debug) +export(splash_enable_javascript) export(splash_focus) export(splash_go) export(splash_har) @@ -59,6 +60,7 @@ export(splash_perf_stats) export(splash_plugins) export(splash_png) export(splash_press) +export(splash_private_mode) export(splash_release) export(splash_response_body) export(splash_send_keys) diff --git a/R/content.r b/R/content.r index 60af224..f72d09e 100644 --- a/R/content.r +++ b/R/content.r @@ -1,6 +1,7 @@ #' Retrieve size of content | body | headers #' #' @param har_resp_obj HAR response object +#' @family splash_har_helpers #' @export get_content_size <- function(har_resp_obj) { csize <- har_resp_obj$response$content$size diff --git a/R/docker-splash.r b/R/docker-splash.r index d53c0cc..264aa6a 100644 --- a/R/docker-splash.r +++ b/R/docker-splash.r @@ -4,6 +4,7 @@ #' @param host Docker host; defaults to `localhost` #' @return `harbor` `host` object #' @export +#' @family splash_docker_helpers #' @examples \dontrun{ #' install_splash() #' splash_container <- start_splash() @@ -28,6 +29,7 @@ install_splash <- function(host = harbor::localhost) { #' @note you need Docker running on your system and have pulled the container with #' [install_splash] for this to work. You should save the resultant `host` #' object for use in [stop_splash]. +#' @family splash_docker_helpers #' @return `harbor` `container` object #' @export #' @examples \dontrun{ @@ -59,6 +61,7 @@ start_splash <- function(host = harbor::localhost, add_tempdir=FALSE) { #' @note you need Docker running on your system and have pulled the container with #' [install_splash()] and started the Splash container with [start_splash()] for this #' to work. You will need the `container` object from [start_splash()] for this to work. +#' @family splash_docker_helpers #' @export #' @examples \dontrun{ #' install_splash() diff --git a/R/dsl.r b/R/dsl.r index 0f19608..9280627 100644 --- a/R/dsl.r +++ b/R/dsl.r @@ -29,6 +29,7 @@ end #' If you need more flexibility, use the [execute_lua()] function. #' #' @md +#' @family splash_dsl_functions #' @param splash_obj splashr object #' @param lua_code length 1 character vector of raw `lua` code #' @export @@ -44,6 +45,7 @@ splash_add_lua <- function(splash_obj, lua_code) { #' @param splash_obj splashr object #' @param enable logical #' @export +#' @family splash_dsl_attributes #' @examples \dontrun{ #' splash_local %>% #' splash_response_body(TRUE) %>% @@ -58,12 +60,64 @@ splash_response_body <- function(splash_obj, enable=FALSE) { splash_obj } +#' Enable or disable execution of JavaSript code embedded in the page. +#' +#' Private mode is enabled by default unless you pass flag `--disable-private-mode` +#' at Splash (server) startup. Note that if you disable private mode browsing data such +#' as cookies or items kept in local storage may persist between requests. +#' +#' @md +#' @param splash_obj splashr object +#' @param enable logical +#' @family splash_dsl_attributes +#' @export +#' @examples \dontrun{ +#' splash_local %>% +#' splash_response_body(TRUE) %>% +#' splash_private_mode(TRUE) %>% +#' splash_user_agent(ua_macos_chrome) %>% +#' splash_go("https://rud.is/b") %>% +#' splash_wait(2) %>% +#' splash_har() -> rud_har +#' } +splash_private_mode <- function(splash_obj, enable=FALSE) { + splash_obj$calls <- c(splash_obj$calls, sprintf('splash.private_mode_enabled = %s', + if (enable) "true" else "false")) + splash_obj +} + +#' Enable or disable execution of JavaSript code embedded in the page. +#' +#' JavaScript execution is enabled by default. +#' +#' @md +#' @param splash_obj splashr object +#' @param enable logical +#' @export +#' @family splash_dsl_attributes +#' @examples \dontrun{ +#' splash_local %>% +#' splash_response_body(TRUE) %>% +#' splash_private_mode(TRUE) %>% +#' splash_enable_javascript(FALSE) %>% +#' splash_user_agent(ua_macos_chrome) %>% +#' splash_go("https://rud.is/b") %>% +#' splash_wait(2) %>% +#' splash_har() -> rud_har +#' } +splash_enable_javascript <- function(splash_obj, enable=TRUE) { + splash_obj$calls <- c(splash_obj$calls, sprintf('splash.js_enabled = %s', + if (enable) "true" else "false")) + splash_obj +} + #' Enable or disable browser plugins (e.g. Flash). #' #' Plugins are disabled by default. #' #' @param splash_obj splashr object #' @param enable logical +#' @family splash_dsl_attributes #' @export #' @examples \dontrun{ #' splash_local %>% @@ -88,6 +142,7 @@ splash_plugins <- function(splash_obj, enable=FALSE) { #' #' @param splash_obj splashr object #' @param enable logical +#' @family splash_dsl_attributes #' @export #' @examples \dontrun{ #' splash_local %>% @@ -110,6 +165,7 @@ splash_images <- function(splash_obj, enable=TRUE) { #' #' @param splash_obj splashr object #' @param url - URL to load; +#' @family splash_dsl_functions #' @export #' @examples \dontrun{ #' splash_local %>% @@ -128,6 +184,7 @@ splash_go <- function(splash_obj, url) { #' Trigger mouse click event in web page. #' +#' @family splash_dsl_functions #' @param splash_obj splashr object #' @param x,y coordinates (distances from the left or top, relative to the current viewport) #' @export @@ -140,6 +197,7 @@ splash_click <- function(splash_obj, x, y) { #' Focus on a document element provided by a CSS selector #' #' @md +#' @family splash_dsl_functions #' @param splash_obj splashr object #' @param selector valid CSS selector #' @references See [the docs](https://splash.readthedocs.io/en/stable/scripting-ref.html#splash-send-text) for more info @@ -155,6 +213,7 @@ splash_focus <- function(splash_obj, selector) { #' This is different from [splash_send_keys()] #' #' @md +#' @family splash_dsl_functions #' @note This adds a call to `splash:wait` so you do not have to #' @param splash_obj splashr object #' @param text string to send @@ -175,6 +234,7 @@ splash_send_text <- function(splash_obj, text) { #' This is different from [splash_send_text()] #' #' @md +#' @family splash_dsl_functions #' @param splash_obj splashr object #' @param keys string to send #' @references See [the docs](https://splash.readthedocs.io/en/stable/scripting-ref.html#splash-send-keys) for more info @@ -188,6 +248,7 @@ splash_send_keys <- function(splash_obj, keys) { #' Trigger mouse release event in web page. #' +#' @family splash_dsl_functions #' @param splash_obj splashr object #' @param x,y coordinates (distances from the left or top, relative to the current viewport) #' @export @@ -199,6 +260,7 @@ splash_release <- function(splash_obj, x, y) { #' Trigger mouse press event in web page. #' +#' @family splash_dsl_functions #' @param splash_obj splashr object #' @param x,y coordinates (distances from the left or top, relative to the current viewport) #' @export @@ -215,6 +277,7 @@ splash_press <- function(splash_obj, x, y) { #' @md #' @param splash_obj splashr object #' @param time number of seconds to wait +#' @family splash_dsl_functions #' @export #' @examples \dontrun{ #' splash_local %>% @@ -233,6 +296,7 @@ splash_wait <- function(splash_obj, time=2) { #' #' @md #' @param splash_obj splashr object +#' @family splash_dsl_functions #' @export splash_har_reset <- function(splash_obj) { splash_obj$calls <- c(splash_obj$calls, 'splash:har_reset()') @@ -246,6 +310,7 @@ splash_har_reset <- function(splash_obj) { #' #' @md #' @param splash_obj splashr object +#' @family splash_dsl_functions #' @export #' @examples \dontrun{ #' splash_local %>% @@ -274,6 +339,7 @@ splash_har <- function(splash_obj) { #' @md #' @param splash_obj splashr object #' @param raw_html if `TRUE` then return a character vector vs an XML document. +#' @family splash_dsl_functions #' @export #' @examples \dontrun{ #' splash_local %>% @@ -304,6 +370,7 @@ splash_html <- function(splash_obj, raw_html=FALSE) { #' #' @md #' @param splash_obj splashr object +#' @family splash_dsl_functions #' @return a [magick] image object #' @export #' @examples \dontrun{ @@ -332,6 +399,7 @@ splash_png <- function(splash_obj) { #' @md #' @param splash_obj splashr object #' @param user_agent 1 element character vector, defaults to `splashr/#.#.#`. +#' @family splash_dsl_functions_functions #' @export #' @examples \dontrun{ #' library(rvest) diff --git a/R/execute.r b/R/execute.r index 6f56fef..60d6f8f 100644 --- a/R/execute.r +++ b/R/execute.r @@ -3,13 +3,19 @@ #' @md #' @param splash_obj Object created by a call to [splash()] #' @param lua_source Browser automation script. See [Splash Script](http://splash.readthedocs.io/en/stable/scripting-tutorial.html#scripting-tutorial) Tutorial for more info. -#' @param timeout A timeout (in seconds) for the render (defaults to 30). -#' @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 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. +#' @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 proxy Proxy profile name or proxy URL. #' @param filters Comma-separated list of request filter names. #' @param save_args A list of argument names to put in cache. #' @param load_args Parameter values to load from cache -#' @return `raw` content from the `httr` call. Given the vast diversity of possible return values, it's up to the caller to handle the return value. +#' @return `raw` content from the `httr` call. Given the vast diversity of possible return +#' values, it's up to the caller to handle the return value. +#' @family splash_renderers #' @export #' @examples \dontrun{ #' splash_local %>% diff --git a/R/helpers.r b/R/helpers.r index bba48b0..4671617 100644 --- a/R/helpers.r +++ b/R/helpers.r @@ -2,6 +2,7 @@ #' #' @md #' @param har_resp_obj HAR response object +#' @family splash_har_helpers #' @return A `raw` vector of the content or `NULL` #' @export get_response_body <- function(har_resp_obj) { @@ -12,6 +13,8 @@ get_response_body <- function(har_resp_obj) { #' Retrieve or test content type of a HAR request object #' +#' @param har_resp_obj a reponse object from [render_har()] or [execute_lua()] +#' @family splash_har_helpers #' @export get_content_type <- function(har_resp_obj) { ctype <- har_resp_obj$response$content$mimeType @@ -29,7 +32,6 @@ is_content_type <- function(har_resp_obj, type="application/json") { } #' @rdname get_content_type -#' @param har_resp_obj a reponse object from [render_har()] or [execute_lua()] #' @export is_json <- function(har_resp_obj) { is_content_type(har_resp_obj) } @@ -97,6 +99,7 @@ is_xhr <- function(har_resp_obj) { #' Retrieve request URL #' #' @param har_resp_obj HAR response object +#' @family splash_har_helpers #' @export get_request_url <- function(har_resp_obj) { utype <- har_resp_obj$request$url @@ -107,6 +110,7 @@ get_request_url <- function(har_resp_obj) { #' Retrieve or test request type #' #' @param har_resp_obj HAR response object +#' @family splash_har_helpers #' @export get_request_type <- function(har_resp_obj) { rtype <- har_resp_obj$request$method @@ -142,6 +146,7 @@ har_entries <- function(x) { #' #' @param x can be a `har` object, `harlog` object or `harentries` object #' @param i index of the HAR entry to retrieve +#' @family splash_har_helpers #' @export get_har_entry <- function(x, i=1) { if (inherits(x, "har")) { @@ -158,6 +163,7 @@ get_har_entry <- function(x, i=1) { #' Retrieves number of HAR entries in a response #' #' @param x can be a `har` object, `harlog` object or `harentries` object +#' @family splash_har_helpers #' @export har_entry_count <- function(x) { if (inherits(x, "har")) { diff --git a/R/render-har.r b/R/render-har.r index 97cefd9..d47a3f8 100644 --- a/R/render-har.r +++ b/R/render-har.r @@ -6,6 +6,7 @@ #' @md #' @param response_body When `TRUE`, response content is included in the HAR records #' @inheritParams render_html +#' @family splash_renderers #' @return a [HARtools] `har` object #' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html) #' @export diff --git a/R/render-html.r b/R/render-html.r index d9ef5d3..aa94acd 100644 --- a/R/render-html.r +++ b/R/render-html.r @@ -6,17 +6,26 @@ #' @param splash_obj Object created by a call to [splash()] #' @param url The URL to render (required) #' @param base_url The base url to render the page with. -#' @param timeout A timeout (in seconds) for the render (defaults to 30). +#' @param 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. #' @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 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 “x”, e.g. 800x600. Default value is "full". +#' @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 “x”, e.g. 800x600. Default value is "full". #' @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. @@ -24,6 +33,7 @@ #' @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` +#' @family splash_renderers #' @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 diff --git a/R/render-jpg.r b/R/render-jpg.r index 4c06d32..9bbd7c1 100644 --- a/R/render-jpg.r +++ b/R/render-jpg.r @@ -4,6 +4,7 @@ #' @param quality JPEG quality parameter in range from 0 to 100. Default is quality=75. #' @inheritParams render_html #' @inheritParams render_png +#' @family splash_renderers #' @return a [magick] image object #' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html) #' @export diff --git a/R/render-json.r b/R/render-json.r index 70376c0..272b865 100644 --- a/R/render-json.r +++ b/R/render-json.r @@ -21,6 +21,7 @@ #' content is not included. To enable it use `response_body` parameter. #' @param response_body Used with `har` parameter. #' @return a huge `list` +#' @family splash_renderers #' @inheritParams render_jpeg #' @note All "whether to include..." parameters are default `TRUE` except for `png` and #' `jpeg` and a custom `print` method is defined to stop your console from being diff --git a/R/render-png.r b/R/render-png.r index a755e35..09c5f65 100644 --- a/R/render-png.r +++ b/R/render-png.r @@ -3,6 +3,7 @@ #' @md #' @param width,height Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio. These are optional #' @param render_all If `TRUE` extend the viewport to include the whole webpage (possibly very tall) before rendering. +#' @family splash_renderers #' @return a [magick] image object #' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html) #' @inheritParams render_html diff --git a/R/render_file.R b/R/render_file.R index 86e3094..e7aaa6b 100644 --- a/R/render_file.R +++ b/R/render_file.R @@ -12,6 +12,7 @@ #' @param output either `html` or `png` to get the page content or an image capture #' @param viewport View width and height (in pixels) of the browser viewport to render the web page. Format is "`x`". e.g. 800x600. Default value is 1024x768. #' @param ... other params to [render_html()] or [render_png()] +#' @family splash_renderers #' @return An XML document or `magick` object #' @export render_file <- function(splash_obj = splash_local, file_path, output=c("html", "png"), wait=0, viewport="1024x768", ...) { diff --git a/R/splashr.r b/R/splashr.r index 69135a6..a2186d1 100644 --- a/R/splashr.r +++ b/R/splashr.r @@ -19,6 +19,7 @@ s_GET <- purrr::safely(GET) #' #' @md #' @param splash_obj A splash connection object +#' @family splash_info_functions #' @return `TRUE` if Slash server is running, otherwise `FALSE` #' @export splash_active <- function(splash_obj = splash_local) { @@ -45,6 +46,7 @@ splash_active <- function(splash_obj = splash_local) { #' Get Splash version information #' #' @param splash_obj A splash connection object +#' @family splash_info_functions #' @export splash_version <- function(splash_obj = splash_local) { execute_lua(splash_obj, ' @@ -58,6 +60,7 @@ end #' Get information about requests/responses for the pages loaded #' #' @param splash_obj A splash connection object +#' @family splash_info_functions #' @export splash_history <- function(splash_obj = splash_local) { execute_lua(splash_obj, ' @@ -72,6 +75,7 @@ end #' Get Splash performance-related statistics #' #' @param splash_obj A splash connection object +#' @family splash_info_functions #' @export splash_perf_stats <- function(splash_obj = splash_local) { execute_lua(splash_obj, ' @@ -85,6 +89,7 @@ end #' Retrieve debug-level info for a Splash server #' #' @param splash_obj A splash connection object +#' @family splash_info_functions #' @export splash_debug <- function(splash_obj = splash_local) { diff --git a/man/execute_lua.Rd b/man/execute_lua.Rd index de2eee0..2d4594e 100644 --- a/man/execute_lua.Rd +++ b/man/execute_lua.Rd @@ -12,9 +12,13 @@ execute_lua(splash_obj, lua_source, timeout = 30, allowed_domains, proxy, \item{lua_source}{Browser automation script. See \href{http://splash.readthedocs.io/en/stable/scripting-tutorial.html#scripting-tutorial}{Splash Script} Tutorial for more info.} -\item{timeout}{A timeout (in seconds) for the render (defaults to 30).} +\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.} -\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_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.} @@ -25,7 +29,8 @@ execute_lua(splash_obj, lua_source, timeout = 30, allowed_domains, proxy, \item{load_args}{Parameter values to load from cache} } \value{ -\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. +\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. } \description{ Execute a custom rendering script and return a result. @@ -48,3 +53,9 @@ rawToChar(res) \%>\% member_scores } } +\seealso{ +Other splash_renderers: \code{\link{render_file}}, + \code{\link{render_har}}, \code{\link{render_html}}, + \code{\link{render_jpeg}}, \code{\link{render_json}}, + \code{\link{render_png}} +} diff --git a/man/get_content_size.Rd b/man/get_content_size.Rd index aa1c5b2..fdee0cd 100644 --- a/man/get_content_size.Rd +++ b/man/get_content_size.Rd @@ -18,3 +18,11 @@ get_headers_size(har_resp_obj) \description{ Retrieve size of content | body | headers } +\seealso{ +Other splash_har_helpers: \code{\link{get_content_type}}, + \code{\link{get_har_entry}}, + \code{\link{get_request_type}}, + \code{\link{get_request_url}}, + \code{\link{get_response_body}}, + \code{\link{har_entry_count}} +} diff --git a/man/get_content_type.Rd b/man/get_content_type.Rd index 56deaeb..c6f2934 100644 --- a/man/get_content_type.Rd +++ b/man/get_content_type.Rd @@ -53,3 +53,11 @@ is_xhr(har_resp_obj) \description{ Retrieve or test content type of a HAR request object } +\seealso{ +Other splash_har_helpers: \code{\link{get_content_size}}, + \code{\link{get_har_entry}}, + \code{\link{get_request_type}}, + \code{\link{get_request_url}}, + \code{\link{get_response_body}}, + \code{\link{har_entry_count}} +} diff --git a/man/get_har_entry.Rd b/man/get_har_entry.Rd index d4d3ead..2c22e8b 100644 --- a/man/get_har_entry.Rd +++ b/man/get_har_entry.Rd @@ -14,3 +14,11 @@ get_har_entry(x, i = 1) \description{ Retrieve an entry by index from a HAR object } +\seealso{ +Other splash_har_helpers: \code{\link{get_content_size}}, + \code{\link{get_content_type}}, + \code{\link{get_request_type}}, + \code{\link{get_request_url}}, + \code{\link{get_response_body}}, + \code{\link{har_entry_count}} +} diff --git a/man/get_request_type.Rd b/man/get_request_type.Rd index 242a44c..1d009ef 100644 --- a/man/get_request_type.Rd +++ b/man/get_request_type.Rd @@ -18,3 +18,11 @@ is_post(har_resp_obj) \description{ Retrieve or test request type } +\seealso{ +Other splash_har_helpers: \code{\link{get_content_size}}, + \code{\link{get_content_type}}, + \code{\link{get_har_entry}}, + \code{\link{get_request_url}}, + \code{\link{get_response_body}}, + \code{\link{har_entry_count}} +} diff --git a/man/get_request_url.Rd b/man/get_request_url.Rd index 6865177..99c841e 100644 --- a/man/get_request_url.Rd +++ b/man/get_request_url.Rd @@ -12,3 +12,11 @@ get_request_url(har_resp_obj) \description{ Retrieve request URL } +\seealso{ +Other splash_har_helpers: \code{\link{get_content_size}}, + \code{\link{get_content_type}}, + \code{\link{get_har_entry}}, + \code{\link{get_request_type}}, + \code{\link{get_response_body}}, + \code{\link{har_entry_count}} +} diff --git a/man/get_response_body.Rd b/man/get_response_body.Rd index efc0ed1..af71749 100644 --- a/man/get_response_body.Rd +++ b/man/get_response_body.Rd @@ -15,3 +15,11 @@ A \code{raw} vector of the content or \code{NULL} \description{ Retrieve the body content of a HAR entry } +\seealso{ +Other splash_har_helpers: \code{\link{get_content_size}}, + \code{\link{get_content_type}}, + \code{\link{get_har_entry}}, + \code{\link{get_request_type}}, + \code{\link{get_request_url}}, + \code{\link{har_entry_count}} +} diff --git a/man/har_entry_count.Rd b/man/har_entry_count.Rd index 05b9102..51172f7 100644 --- a/man/har_entry_count.Rd +++ b/man/har_entry_count.Rd @@ -12,3 +12,11 @@ har_entry_count(x) \description{ Retrieves number of HAR entries in a response } +\seealso{ +Other splash_har_helpers: \code{\link{get_content_size}}, + \code{\link{get_content_type}}, + \code{\link{get_har_entry}}, + \code{\link{get_request_type}}, + \code{\link{get_request_url}}, + \code{\link{get_response_body}} +} diff --git a/man/install_splash.Rd b/man/install_splash.Rd index cd32992..6302b65 100644 --- a/man/install_splash.Rd +++ b/man/install_splash.Rd @@ -22,3 +22,7 @@ splash_container <- start_splash() stop_splash(splash_container) } } +\seealso{ +Other splash_docker_helpers: \code{\link{start_splash}}, + \code{\link{stop_splash}} +} diff --git a/man/render_file.Rd b/man/render_file.Rd index 5f24a2f..ec812fb 100644 --- a/man/render_file.Rd +++ b/man/render_file.Rd @@ -30,3 +30,9 @@ The suggested use-case for this is rendering a widget TODO Test if container is running TODO Enable passing in of an htmlwidget and use saveWidget } +\seealso{ +Other splash_renderers: \code{\link{execute_lua}}, + \code{\link{render_har}}, \code{\link{render_html}}, + \code{\link{render_jpeg}}, \code{\link{render_json}}, + \code{\link{render_png}} +} diff --git a/man/render_har.Rd b/man/render_har.Rd index 96c92ed..5884bc4 100644 --- a/man/render_har.Rd +++ b/man/render_har.Rd @@ -19,7 +19,9 @@ render_har(splash_obj = splash_local, url, base_url, response_body = FALSE, \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{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.} \item{resource_timeout}{A timeout (in seconds) for individual network requests.} @@ -33,13 +35,20 @@ render_har(splash_obj = splash_local, url, base_url, response_body = FALSE, \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_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{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{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 “x”, e.g. 800x600. Default value is "full".} +\item{viewport}{View width and height (in pixels) of the browser viewport to render the +web page. Format is “x”, e.g. 800x600. Default value is "full".} \item{images}{Whether to download images.} @@ -63,3 +72,9 @@ is incredibly detailed, full of information on every component loaded. \references{ \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs} } +\seealso{ +Other splash_renderers: \code{\link{execute_lua}}, + \code{\link{render_file}}, \code{\link{render_html}}, + \code{\link{render_jpeg}}, \code{\link{render_json}}, + \code{\link{render_png}} +} diff --git a/man/render_html.Rd b/man/render_html.Rd index e6182e4..841ff4f 100644 --- a/man/render_html.Rd +++ b/man/render_html.Rd @@ -16,7 +16,9 @@ render_html(splash_obj = splash_local, url, base_url, timeout = 30, \item{base_url}{The base url to render the page with.} -\item{timeout}{A timeout (in seconds) for the render (defaults to 30).} +\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.} \item{resource_timeout}{A timeout (in seconds) for individual network requests.} @@ -30,13 +32,20 @@ render_html(splash_obj = splash_local, url, base_url, timeout = 30, \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_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{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{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 “x”, e.g. 800x600. Default value is "full".} +\item{viewport}{View width and height (in pixels) of the browser viewport to render the +web page. Format is “x”, e.g. 800x600. Default value is "full".} \item{images}{Whether to download images.} @@ -64,3 +73,9 @@ Similar to \code{rvest::read_html}. \references{ \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs} } +\seealso{ +Other splash_renderers: \code{\link{execute_lua}}, + \code{\link{render_file}}, \code{\link{render_har}}, + \code{\link{render_jpeg}}, \code{\link{render_json}}, + \code{\link{render_png}} +} diff --git a/man/render_jpeg.Rd b/man/render_jpeg.Rd index c7adf72..85dfd77 100644 --- a/man/render_jpeg.Rd +++ b/man/render_jpeg.Rd @@ -23,7 +23,9 @@ render_jpeg(splash_obj = splash_local, url, base_url = NULL, quality = 75, \item{height}{Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio. These are optional} -\item{timeout}{A timeout (in seconds) for the render (defaults to 30).} +\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.} \item{resource_timeout}{A timeout (in seconds) for individual network requests.} @@ -39,13 +41,20 @@ render_jpeg(splash_obj = splash_local, url, base_url = NULL, quality = 75, \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_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{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{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 “x”, e.g. 800x600. Default value is "full".} +\item{viewport}{View width and height (in pixels) of the browser viewport to render the +web page. Format is “x”, e.g. 800x600. Default value is "full".} \item{images}{Whether to download images.} @@ -68,3 +77,9 @@ Return a image (in JPEG format) of the javascript-rendered page. \references{ \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs} } +\seealso{ +Other splash_renderers: \code{\link{execute_lua}}, + \code{\link{render_file}}, \code{\link{render_har}}, + \code{\link{render_html}}, \code{\link{render_json}}, + \code{\link{render_png}} +} diff --git a/man/render_json.Rd b/man/render_json.Rd index 33d6ecb..9f41e1b 100644 --- a/man/render_json.Rd +++ b/man/render_json.Rd @@ -25,7 +25,9 @@ render_json(splash_obj = splash_local, url, base_url = NULL, quality = 75, \item{height}{Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio. These are optional} -\item{timeout}{A timeout (in seconds) for the render (defaults to 30).} +\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.} \item{resource_timeout}{A timeout (in seconds) for individual network requests.} @@ -41,13 +43,20 @@ render_json(splash_obj = splash_local, url, base_url = NULL, quality = 75, \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_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{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{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 “x”, e.g. 800x600. Default value is "full".} +\item{viewport}{View width and height (in pixels) of the browser viewport to render the +web page. Format is “x”, e.g. 800x600. Default value is "full".} \item{images}{Whether to download images.} @@ -100,3 +109,9 @@ overwhelmed with data. Use \code{\link[=str]{str()}} to inspect various portions \references{ \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs} } +\seealso{ +Other splash_renderers: \code{\link{execute_lua}}, + \code{\link{render_file}}, \code{\link{render_har}}, + \code{\link{render_html}}, \code{\link{render_jpeg}}, + \code{\link{render_png}} +} diff --git a/man/render_png.Rd b/man/render_png.Rd index 2ef513d..96947ce 100644 --- a/man/render_png.Rd +++ b/man/render_png.Rd @@ -19,7 +19,9 @@ render_png(splash_obj = splash_local, url, base_url = NULL, width, height, \item{width, height}{Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio. These are optional} -\item{timeout}{A timeout (in seconds) for the render (defaults to 30).} +\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.} \item{resource_timeout}{A timeout (in seconds) for individual network requests.} @@ -35,13 +37,20 @@ render_png(splash_obj = splash_local, url, base_url = NULL, width, height, \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_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{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{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 “x”, e.g. 800x600. Default value is "full".} +\item{viewport}{View width and height (in pixels) of the browser viewport to render the +web page. Format is “x”, e.g. 800x600. Default value is "full".} \item{images}{Whether to download images.} @@ -64,3 +73,9 @@ Return a image (in PNG format) of the javascript-rendered page. \references{ \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs} } +\seealso{ +Other splash_renderers: \code{\link{execute_lua}}, + \code{\link{render_file}}, \code{\link{render_har}}, + \code{\link{render_html}}, \code{\link{render_jpeg}}, + \code{\link{render_json}} +} diff --git a/man/splash_active.Rd b/man/splash_active.Rd index d80ef88..b7ae3af 100644 --- a/man/splash_active.Rd +++ b/man/splash_active.Rd @@ -15,3 +15,9 @@ splash_active(splash_obj = splash_local) \description{ Test if a Splash server is up } +\seealso{ +Other splash_info_functions: \code{\link{splash_debug}}, + \code{\link{splash_history}}, + \code{\link{splash_perf_stats}}, + \code{\link{splash_version}} +} diff --git a/man/splash_add_lua.Rd b/man/splash_add_lua.Rd index 2ae3b29..bd1e03e 100644 --- a/man/splash_add_lua.Rd +++ b/man/splash_add_lua.Rd @@ -26,3 +26,12 @@ end If you need more flexibility, use the \code{\link[=execute_lua]{execute_lua()}} function. } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_click}}, + \code{\link{splash_focus}}, \code{\link{splash_go}}, + \code{\link{splash_har_reset}}, \code{\link{splash_har}}, + \code{\link{splash_html}}, \code{\link{splash_png}}, + \code{\link{splash_press}}, \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_click.Rd b/man/splash_click.Rd index 3b3f306..7553589 100644 --- a/man/splash_click.Rd +++ b/man/splash_click.Rd @@ -14,3 +14,12 @@ splash_click(splash_obj, x, y) \description{ Trigger mouse click event in web page. } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_focus}}, \code{\link{splash_go}}, + \code{\link{splash_har_reset}}, \code{\link{splash_har}}, + \code{\link{splash_html}}, \code{\link{splash_png}}, + \code{\link{splash_press}}, \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_debug.Rd b/man/splash_debug.Rd index 76f379f..b806888 100644 --- a/man/splash_debug.Rd +++ b/man/splash_debug.Rd @@ -15,4 +15,10 @@ splash_debug(splash_obj = splash_local) \description{ Retrieve debug-level info for a Splash server } +\seealso{ +Other splash_info_functions: \code{\link{splash_active}}, + \code{\link{splash_history}}, + \code{\link{splash_perf_stats}}, + \code{\link{splash_version}} +} \keyword{internal} diff --git a/man/splash_enable_javascript.Rd b/man/splash_enable_javascript.Rd new file mode 100644 index 0000000..56348c1 --- /dev/null +++ b/man/splash_enable_javascript.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/dsl.r +\name{splash_enable_javascript} +\alias{splash_enable_javascript} +\title{Enable or disable execution of JavaSript code embedded in the page.} +\usage{ +splash_enable_javascript(splash_obj, enable = TRUE) +} +\arguments{ +\item{splash_obj}{splashr object} + +\item{enable}{logical} +} +\description{ +JavaScript execution is enabled by default. +} +\examples{ +\dontrun{ +splash_local \%>\% + splash_response_body(TRUE) \%>\% + splash_private_mode(TRUE) \%>\% + splash_enable_javascript(FALSE) \%>\% + splash_user_agent(ua_macos_chrome) \%>\% + splash_go("https://rud.is/b") \%>\% + splash_wait(2) \%>\% + splash_har() -> rud_har +} +} +\seealso{ +Other splash_dsl_attributes: \code{\link{splash_images}}, + \code{\link{splash_plugins}}, + \code{\link{splash_private_mode}}, + \code{\link{splash_response_body}} +} diff --git a/man/splash_focus.Rd b/man/splash_focus.Rd index 85e2b21..c5d7dfd 100644 --- a/man/splash_focus.Rd +++ b/man/splash_focus.Rd @@ -17,3 +17,12 @@ Focus on a document element provided by a CSS selector \references{ See \href{https://splash.readthedocs.io/en/stable/scripting-ref.html#splash-send-text}{the docs} for more info } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_go}}, + \code{\link{splash_har_reset}}, \code{\link{splash_har}}, + \code{\link{splash_html}}, \code{\link{splash_png}}, + \code{\link{splash_press}}, \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_go.Rd b/man/splash_go.Rd index 9746d32..24f16c3 100644 --- a/man/splash_go.Rd +++ b/man/splash_go.Rd @@ -25,3 +25,12 @@ splash_local \%>\% splash_har() -> rud_har } } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_focus}}, + \code{\link{splash_har_reset}}, \code{\link{splash_har}}, + \code{\link{splash_html}}, \code{\link{splash_png}}, + \code{\link{splash_press}}, \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_har.Rd b/man/splash_har.Rd index 3f01021..2ac3948 100644 --- a/man/splash_har.Rd +++ b/man/splash_har.Rd @@ -23,3 +23,12 @@ splash_local \%>\% splash_har() -> rud_har } } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_focus}}, + \code{\link{splash_go}}, \code{\link{splash_har_reset}}, + \code{\link{splash_html}}, \code{\link{splash_png}}, + \code{\link{splash_press}}, \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_har_reset.Rd b/man/splash_har_reset.Rd index ef87f20..4355ab7 100644 --- a/man/splash_har_reset.Rd +++ b/man/splash_har_reset.Rd @@ -12,3 +12,12 @@ splash_har_reset(splash_obj) \description{ Drops all internally stored HAR records. } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_focus}}, + \code{\link{splash_go}}, \code{\link{splash_har}}, + \code{\link{splash_html}}, \code{\link{splash_png}}, + \code{\link{splash_press}}, \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_history.Rd b/man/splash_history.Rd index 54303e6..b0d1aab 100644 --- a/man/splash_history.Rd +++ b/man/splash_history.Rd @@ -12,3 +12,9 @@ splash_history(splash_obj = splash_local) \description{ Get information about requests/responses for the pages loaded } +\seealso{ +Other splash_info_functions: \code{\link{splash_active}}, + \code{\link{splash_debug}}, + \code{\link{splash_perf_stats}}, + \code{\link{splash_version}} +} diff --git a/man/splash_html.Rd b/man/splash_html.Rd index 747cb4e..c6170c8 100644 --- a/man/splash_html.Rd +++ b/man/splash_html.Rd @@ -25,3 +25,12 @@ splash_local \%>\% splash_html() -> rud_pg } } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_focus}}, + \code{\link{splash_go}}, \code{\link{splash_har_reset}}, + \code{\link{splash_har}}, \code{\link{splash_png}}, + \code{\link{splash_press}}, \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_images.Rd b/man/splash_images.Rd index 0f6b292..c8465ac 100644 --- a/man/splash_images.Rd +++ b/man/splash_images.Rd @@ -27,3 +27,9 @@ splash_local \%>\% splash_har() -> rud_har } } +\seealso{ +Other splash_dsl_attributes: \code{\link{splash_enable_javascript}}, + \code{\link{splash_plugins}}, + \code{\link{splash_private_mode}}, + \code{\link{splash_response_body}} +} diff --git a/man/splash_perf_stats.Rd b/man/splash_perf_stats.Rd index 4279929..96a2800 100644 --- a/man/splash_perf_stats.Rd +++ b/man/splash_perf_stats.Rd @@ -12,3 +12,8 @@ splash_perf_stats(splash_obj = splash_local) \description{ Get Splash performance-related statistics } +\seealso{ +Other splash_info_functions: \code{\link{splash_active}}, + \code{\link{splash_debug}}, \code{\link{splash_history}}, + \code{\link{splash_version}} +} diff --git a/man/splash_plugins.Rd b/man/splash_plugins.Rd index 1c7aadc..63ee58e 100644 --- a/man/splash_plugins.Rd +++ b/man/splash_plugins.Rd @@ -24,3 +24,9 @@ splash_local \%>\% splash_har() -> rud_har } } +\seealso{ +Other splash_dsl_attributes: \code{\link{splash_enable_javascript}}, + \code{\link{splash_images}}, + \code{\link{splash_private_mode}}, + \code{\link{splash_response_body}} +} diff --git a/man/splash_png.Rd b/man/splash_png.Rd index 37bcba2..c0fa149 100644 --- a/man/splash_png.Rd +++ b/man/splash_png.Rd @@ -25,3 +25,12 @@ splash_local \%>\% splash_png() } } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_focus}}, + \code{\link{splash_go}}, \code{\link{splash_har_reset}}, + \code{\link{splash_har}}, \code{\link{splash_html}}, + \code{\link{splash_press}}, \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_press.Rd b/man/splash_press.Rd index 4c9ae54..38655fb 100644 --- a/man/splash_press.Rd +++ b/man/splash_press.Rd @@ -14,3 +14,12 @@ splash_press(splash_obj, x, y) \description{ Trigger mouse press event in web page. } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_focus}}, + \code{\link{splash_go}}, \code{\link{splash_har_reset}}, + \code{\link{splash_har}}, \code{\link{splash_html}}, + \code{\link{splash_png}}, \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_private_mode.Rd b/man/splash_private_mode.Rd new file mode 100644 index 0000000..5c231ea --- /dev/null +++ b/man/splash_private_mode.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/dsl.r +\name{splash_private_mode} +\alias{splash_private_mode} +\title{Enable or disable execution of JavaSript code embedded in the page.} +\usage{ +splash_private_mode(splash_obj, enable = FALSE) +} +\arguments{ +\item{splash_obj}{splashr object} + +\item{enable}{logical} +} +\description{ +Private mode is enabled by default unless you pass flag \code{--disable-private-mode} +at Splash (server) startup. Note that if you disable private mode browsing data such +as cookies or items kept in local storage may persist between requests. +} +\examples{ +\dontrun{ +splash_local \%>\% + splash_response_body(TRUE) \%>\% + splash_private_mode(TRUE) \%>\% + splash_user_agent(ua_macos_chrome) \%>\% + splash_go("https://rud.is/b") \%>\% + splash_wait(2) \%>\% + splash_har() -> rud_har +} +} +\seealso{ +Other splash_dsl_attributes: \code{\link{splash_enable_javascript}}, + \code{\link{splash_images}}, + \code{\link{splash_plugins}}, + \code{\link{splash_response_body}} +} diff --git a/man/splash_release.Rd b/man/splash_release.Rd index 6135ed8..79696b6 100644 --- a/man/splash_release.Rd +++ b/man/splash_release.Rd @@ -14,3 +14,12 @@ splash_release(splash_obj, x, y) \description{ Trigger mouse release event in web page. } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_focus}}, + \code{\link{splash_go}}, \code{\link{splash_har_reset}}, + \code{\link{splash_har}}, \code{\link{splash_html}}, + \code{\link{splash_png}}, \code{\link{splash_press}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_response_body.Rd b/man/splash_response_body.Rd index 3b33f2e..1a90d2e 100644 --- a/man/splash_response_body.Rd +++ b/man/splash_response_body.Rd @@ -24,3 +24,9 @@ splash_local \%>\% splash_har() -> rud_har } } +\seealso{ +Other splash_dsl_attributes: \code{\link{splash_enable_javascript}}, + \code{\link{splash_images}}, + \code{\link{splash_plugins}}, + \code{\link{splash_private_mode}} +} diff --git a/man/splash_send_keys.Rd b/man/splash_send_keys.Rd index 09cc6e4..c88add9 100644 --- a/man/splash_send_keys.Rd +++ b/man/splash_send_keys.Rd @@ -23,3 +23,12 @@ This is different from \code{\link[=splash_send_text]{splash_send_text()}} \references{ See \href{https://splash.readthedocs.io/en/stable/scripting-ref.html#splash-send-keys}{the docs} for more info } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_focus}}, + \code{\link{splash_go}}, \code{\link{splash_har_reset}}, + \code{\link{splash_har}}, \code{\link{splash_html}}, + \code{\link{splash_png}}, \code{\link{splash_press}}, + \code{\link{splash_release}}, + \code{\link{splash_send_text}}, \code{\link{splash_wait}} +} diff --git a/man/splash_send_text.Rd b/man/splash_send_text.Rd index 3e60f0c..35742b2 100644 --- a/man/splash_send_text.Rd +++ b/man/splash_send_text.Rd @@ -20,3 +20,12 @@ This adds a call to \code{splash:wait} so you do not have to \references{ See \href{https://splash.readthedocs.io/en/stable/scripting-ref.html#splash-send-keys}{the docs} for more info } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_focus}}, + \code{\link{splash_go}}, \code{\link{splash_har_reset}}, + \code{\link{splash_har}}, \code{\link{splash_html}}, + \code{\link{splash_png}}, \code{\link{splash_press}}, + \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, \code{\link{splash_wait}} +} diff --git a/man/splash_version.Rd b/man/splash_version.Rd index 6fc3291..f405695 100644 --- a/man/splash_version.Rd +++ b/man/splash_version.Rd @@ -12,3 +12,8 @@ splash_version(splash_obj = splash_local) \description{ Get Splash version information } +\seealso{ +Other splash_info_functions: \code{\link{splash_active}}, + \code{\link{splash_debug}}, \code{\link{splash_history}}, + \code{\link{splash_perf_stats}} +} diff --git a/man/splash_wait.Rd b/man/splash_wait.Rd index 3390129..3bcd705 100644 --- a/man/splash_wait.Rd +++ b/man/splash_wait.Rd @@ -24,3 +24,13 @@ splash_local \%>\% splash_har() -> rud_har } } +\seealso{ +Other splash_dsl_functions: \code{\link{splash_add_lua}}, + \code{\link{splash_click}}, \code{\link{splash_focus}}, + \code{\link{splash_go}}, \code{\link{splash_har_reset}}, + \code{\link{splash_har}}, \code{\link{splash_html}}, + \code{\link{splash_png}}, \code{\link{splash_press}}, + \code{\link{splash_release}}, + \code{\link{splash_send_keys}}, + \code{\link{splash_send_text}} +} diff --git a/man/start_splash.Rd b/man/start_splash.Rd index 9a650de..2dba455 100644 --- a/man/start_splash.Rd +++ b/man/start_splash.Rd @@ -35,3 +35,7 @@ splash_container <- start_splash() stop_splash(splash_container) } } +\seealso{ +Other splash_docker_helpers: \code{\link{install_splash}}, + \code{\link{stop_splash}} +} diff --git a/man/stop_splash.Rd b/man/stop_splash.Rd index c376cb5..aadcad2 100644 --- a/man/stop_splash.Rd +++ b/man/stop_splash.Rd @@ -24,3 +24,7 @@ splash_container <- start_splash() stop_splash(splash_container) } } +\seealso{ +Other splash_docker_helpers: \code{\link{install_splash}}, + \code{\link{start_splash}} +}