boB Rudis 3 years ago
parent
commit
a7c5406264
No known key found for this signature in database
53 changed files with 536 additions and 37 deletions
  1. 2
    0
      NAMESPACE
  2. 1
    0
      R/content.r
  3. 3
    0
      R/docker-splash.r
  4. 68
    0
      R/dsl.r
  5. 9
    3
      R/execute.r
  6. 7
    1
      R/helpers.r
  7. 1
    0
      R/render-har.r
  8. 15
    5
      R/render-html.r
  9. 1
    0
      R/render-jpg.r
  10. 1
    0
      R/render-json.r
  11. 1
    0
      R/render-png.r
  12. 1
    0
      R/render_file.R
  13. 5
    0
      R/splashr.r
  14. 14
    3
      man/execute_lua.Rd
  15. 8
    0
      man/get_content_size.Rd
  16. 8
    0
      man/get_content_type.Rd
  17. 8
    0
      man/get_har_entry.Rd
  18. 8
    0
      man/get_request_type.Rd
  19. 8
    0
      man/get_request_url.Rd
  20. 8
    0
      man/get_response_body.Rd
  21. 8
    0
      man/har_entry_count.Rd
  22. 4
    0
      man/install_splash.Rd
  23. 6
    0
      man/render_file.Rd
  24. 20
    5
      man/render_har.Rd
  25. 20
    5
      man/render_html.Rd
  26. 20
    5
      man/render_jpeg.Rd
  27. 20
    5
      man/render_json.Rd
  28. 20
    5
      man/render_png.Rd
  29. 6
    0
      man/splash_active.Rd
  30. 9
    0
      man/splash_add_lua.Rd
  31. 9
    0
      man/splash_click.Rd
  32. 6
    0
      man/splash_debug.Rd
  33. 34
    0
      man/splash_enable_javascript.Rd
  34. 9
    0
      man/splash_focus.Rd
  35. 9
    0
      man/splash_go.Rd
  36. 9
    0
      man/splash_har.Rd
  37. 9
    0
      man/splash_har_reset.Rd
  38. 6
    0
      man/splash_history.Rd
  39. 9
    0
      man/splash_html.Rd
  40. 6
    0
      man/splash_images.Rd
  41. 5
    0
      man/splash_perf_stats.Rd
  42. 6
    0
      man/splash_plugins.Rd
  43. 9
    0
      man/splash_png.Rd
  44. 9
    0
      man/splash_press.Rd
  45. 35
    0
      man/splash_private_mode.Rd
  46. 9
    0
      man/splash_release.Rd
  47. 6
    0
      man/splash_response_body.Rd
  48. 9
    0
      man/splash_send_keys.Rd
  49. 9
    0
      man/splash_send_text.Rd
  50. 5
    0
      man/splash_version.Rd
  51. 10
    0
      man/splash_wait.Rd
  52. 4
    0
      man/start_splash.Rd
  53. 4
    0
      man/stop_splash.Rd

+ 2
- 0
NAMESPACE View File

@@ -47,6 +47,7 @@ export(splash_active)
47 47
 export(splash_add_lua)
48 48
 export(splash_click)
49 49
 export(splash_debug)
50
+export(splash_enable_javascript)
50 51
 export(splash_focus)
51 52
 export(splash_go)
52 53
 export(splash_har)
@@ -59,6 +60,7 @@ export(splash_perf_stats)
59 60
 export(splash_plugins)
60 61
 export(splash_png)
61 62
 export(splash_press)
63
+export(splash_private_mode)
62 64
 export(splash_release)
63 65
 export(splash_response_body)
64 66
 export(splash_send_keys)

+ 1
- 0
R/content.r View File

@@ -1,6 +1,7 @@
1 1
 #' Retrieve size of content | body | headers
2 2
 #'
3 3
 #' @param har_resp_obj HAR response object
4
+#' @family splash_har_helpers
4 5
 #' @export
5 6
 get_content_size <- function(har_resp_obj) {
6 7
   csize <- har_resp_obj$response$content$size

+ 3
- 0
R/docker-splash.r View File

@@ -4,6 +4,7 @@
4 4
 #' @param host Docker host; defaults to `localhost`
5 5
 #' @return `harbor` `host` object
6 6
 #' @export
7
+#' @family splash_docker_helpers
7 8
 #' @examples \dontrun{
8 9
 #' install_splash()
9 10
 #' splash_container <- start_splash()
@@ -28,6 +29,7 @@ install_splash <- function(host = harbor::localhost) {
28 29
 #' @note you need Docker running on your system and have pulled the container with
29 30
 #'       [install_splash] for this to work. You should save the resultant `host`
30 31
 #'       object for use in [stop_splash].
32
+#' @family splash_docker_helpers
31 33
 #' @return `harbor` `container` object
32 34
 #' @export
33 35
 #' @examples \dontrun{
@@ -59,6 +61,7 @@ start_splash <- function(host = harbor::localhost, add_tempdir=FALSE) {
59 61
 #' @note you need Docker running on your system and have pulled the container with
60 62
 #'       [install_splash()] and started the Splash container with [start_splash()] for this
61 63
 #'       to work. You will need the `container` object from [start_splash()] for this to work.
64
+#' @family splash_docker_helpers
62 65
 #' @export
63 66
 #' @examples \dontrun{
64 67
 #' install_splash()

+ 68
- 0
R/dsl.r View File

@@ -29,6 +29,7 @@ end
29 29
 #' If you need more flexibility, use the [execute_lua()] function.
30 30
 #'
31 31
 #' @md
32
+#' @family splash_dsl_functions
32 33
 #' @param splash_obj splashr object
33 34
 #' @param lua_code length 1 character vector of raw `lua` code
34 35
 #' @export
@@ -44,6 +45,7 @@ splash_add_lua <- function(splash_obj, lua_code) {
44 45
 #' @param splash_obj splashr object
45 46
 #' @param enable logical
46 47
 #' @export
48
+#' @family splash_dsl_attributes
47 49
 #' @examples \dontrun{
48 50
 #' splash_local %>%
49 51
 #'   splash_response_body(TRUE) %>%
@@ -58,12 +60,64 @@ splash_response_body <- function(splash_obj, enable=FALSE) {
58 60
   splash_obj
59 61
 }
60 62
 
63
+#' Enable or disable execution of JavaSript code embedded in the page.
64
+#'
65
+#' Private mode is enabled by default unless you pass flag `--disable-private-mode`
66
+#' at Splash (server) startup. Note that if you disable private mode browsing data such
67
+#' as cookies or items kept in local storage may persist between requests.
68
+#'
69
+#' @md
70
+#' @param splash_obj splashr object
71
+#' @param enable logical
72
+#' @family splash_dsl_attributes
73
+#' @export
74
+#' @examples \dontrun{
75
+#' splash_local %>%
76
+#'   splash_response_body(TRUE) %>%
77
+#'   splash_private_mode(TRUE) %>%
78
+#'   splash_user_agent(ua_macos_chrome) %>%
79
+#'   splash_go("https://rud.is/b") %>%
80
+#'   splash_wait(2) %>%
81
+#'   splash_har() -> rud_har
82
+#' }
83
+splash_private_mode <- function(splash_obj, enable=FALSE) {
84
+  splash_obj$calls <- c(splash_obj$calls, sprintf('splash.private_mode_enabled = %s',
85
+                                                  if (enable) "true" else "false"))
86
+  splash_obj
87
+}
88
+
89
+#' Enable or disable execution of JavaSript code embedded in the page.
90
+#'
91
+#' JavaScript execution is enabled by default.
92
+#'
93
+#' @md
94
+#' @param splash_obj splashr object
95
+#' @param enable logical
96
+#' @export
97
+#' @family splash_dsl_attributes
98
+#' @examples \dontrun{
99
+#' splash_local %>%
100
+#'   splash_response_body(TRUE) %>%
101
+#'   splash_private_mode(TRUE) %>%
102
+#'   splash_enable_javascript(FALSE) %>%
103
+#'   splash_user_agent(ua_macos_chrome) %>%
104
+#'   splash_go("https://rud.is/b") %>%
105
+#'   splash_wait(2) %>%
106
+#'   splash_har() -> rud_har
107
+#' }
108
+splash_enable_javascript <- function(splash_obj, enable=TRUE) {
109
+  splash_obj$calls <- c(splash_obj$calls, sprintf('splash.js_enabled = %s',
110
+                                                  if (enable) "true" else "false"))
111
+  splash_obj
112
+}
113
+
61 114
 #' Enable or disable browser plugins (e.g. Flash).
62 115
 #'
63 116
 #' Plugins are disabled by default.
64 117
 #'
65 118
 #' @param splash_obj splashr object
66 119
 #' @param enable logical
120
+#' @family splash_dsl_attributes
67 121
 #' @export
68 122
 #' @examples \dontrun{
69 123
 #' splash_local %>%
@@ -88,6 +142,7 @@ splash_plugins <- function(splash_obj, enable=FALSE) {
88 142
 #'
89 143
 #' @param splash_obj splashr object
90 144
 #' @param enable logical
145
+#' @family splash_dsl_attributes
91 146
 #' @export
92 147
 #' @examples \dontrun{
93 148
 #' splash_local %>%
@@ -110,6 +165,7 @@ splash_images <- function(splash_obj, enable=TRUE) {
110 165
 #'
111 166
 #' @param splash_obj splashr object
112 167
 #' @param url - URL to load;
168
+#' @family splash_dsl_functions
113 169
 #' @export
114 170
 #' @examples \dontrun{
115 171
 #' splash_local %>%
@@ -128,6 +184,7 @@ splash_go <- function(splash_obj, url) {
128 184
 
129 185
 #' Trigger mouse click event in web page.
130 186
 #'
187
+#' @family splash_dsl_functions
131 188
 #' @param splash_obj splashr object
132 189
 #' @param x,y coordinates (distances from the left or top, relative to the current viewport)
133 190
 #' @export
@@ -140,6 +197,7 @@ splash_click <- function(splash_obj, x, y) {
140 197
 #' Focus on a document element provided by a CSS selector
141 198
 #'
142 199
 #' @md
200
+#' @family splash_dsl_functions
143 201
 #' @param splash_obj splashr object
144 202
 #' @param selector valid CSS selector
145 203
 #' @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) {
155 213
 #' This is different from [splash_send_keys()]
156 214
 #'
157 215
 #' @md
216
+#' @family splash_dsl_functions
158 217
 #' @note This adds a call to `splash:wait` so you do not have to
159 218
 #' @param splash_obj splashr object
160 219
 #' @param text string to send
@@ -175,6 +234,7 @@ splash_send_text <- function(splash_obj, text) {
175 234
 #' This is different from [splash_send_text()]
176 235
 #'
177 236
 #' @md
237
+#' @family splash_dsl_functions
178 238
 #' @param splash_obj splashr object
179 239
 #' @param keys string to send
180 240
 #' @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) {
188 248
 
189 249
 #' Trigger mouse release event in web page.
190 250
 #'
251
+#' @family splash_dsl_functions
191 252
 #' @param splash_obj splashr object
192 253
 #' @param x,y coordinates (distances from the left or top, relative to the current viewport)
193 254
 #' @export
@@ -199,6 +260,7 @@ splash_release <- function(splash_obj, x, y) {
199 260
 
200 261
 #' Trigger mouse press event in web page.
201 262
 #'
263
+#' @family splash_dsl_functions
202 264
 #' @param splash_obj splashr object
203 265
 #' @param x,y coordinates (distances from the left or top, relative to the current viewport)
204 266
 #' @export
@@ -215,6 +277,7 @@ splash_press <- function(splash_obj, x, y) {
215 277
 #' @md
216 278
 #' @param splash_obj splashr object
217 279
 #' @param time number of seconds to wait
280
+#' @family splash_dsl_functions
218 281
 #' @export
219 282
 #' @examples \dontrun{
220 283
 #' splash_local %>%
@@ -233,6 +296,7 @@ splash_wait <- function(splash_obj, time=2) {
233 296
 #'
234 297
 #' @md
235 298
 #' @param splash_obj splashr object
299
+#' @family splash_dsl_functions
236 300
 #' @export
237 301
 splash_har_reset <- function(splash_obj) {
238 302
    splash_obj$calls <- c(splash_obj$calls, 'splash:har_reset()')
@@ -246,6 +310,7 @@ splash_har_reset <- function(splash_obj) {
246 310
 #'
247 311
 #' @md
248 312
 #' @param splash_obj splashr object
313
+#' @family splash_dsl_functions
249 314
 #' @export
250 315
 #' @examples \dontrun{
251 316
 #' splash_local %>%
@@ -274,6 +339,7 @@ splash_har <- function(splash_obj) {
274 339
 #' @md
275 340
 #' @param splash_obj splashr object
276 341
 #' @param raw_html if `TRUE` then return a character vector vs an XML document.
342
+#' @family splash_dsl_functions
277 343
 #' @export
278 344
 #' @examples \dontrun{
279 345
 #' splash_local %>%
@@ -304,6 +370,7 @@ splash_html <- function(splash_obj, raw_html=FALSE) {
304 370
 #'
305 371
 #' @md
306 372
 #' @param splash_obj splashr object
373
+#' @family splash_dsl_functions
307 374
 #' @return a [magick] image object
308 375
 #' @export
309 376
 #' @examples \dontrun{
@@ -332,6 +399,7 @@ splash_png <- function(splash_obj) {
332 399
 #' @md
333 400
 #' @param splash_obj splashr object
334 401
 #' @param user_agent 1 element character vector, defaults to `splashr/#.#.#`.
402
+#' @family splash_dsl_functions_functions
335 403
 #' @export
336 404
 #' @examples \dontrun{
337 405
 #' library(rvest)

+ 9
- 3
R/execute.r View File

@@ -3,13 +3,19 @@
3 3
 #' @md
4 4
 #' @param splash_obj Object created by a call to [splash()]
5 5
 #' @param lua_source Browser automation script. See [Splash Script](http://splash.readthedocs.io/en/stable/scripting-tutorial.html#scripting-tutorial) Tutorial for more info.
6
-#' @param timeout A timeout (in seconds) for the render (defaults to 30).
7
-#' @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.
6
+#' @param timeout A timeout (in seconds) for the render (defaults to 30). Without
7
+#'        reconfiguring the startup parameters of the Splash server (not this package)
8
+#'        the maximum allowed value for the timeout is 60 seconds.
9
+#' @param allowed_domains Comma-separated list of allowed domain names. If present, Splash
10
+#'        won’t load anything neither from domains not in this list nor from subdomains of
11
+#'        domains not in this list.
8 12
 #' @param proxy Proxy profile name or proxy URL.
9 13
 #' @param filters Comma-separated list of request filter names.
10 14
 #' @param save_args A list of argument names to put in cache.
11 15
 #' @param load_args Parameter values to load from cache
12
-#' @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.
16
+#' @return `raw` content from the `httr` call. Given the vast diversity of possible return
17
+#'         values, it's up to the caller to handle the return value.
18
+#' @family splash_renderers
13 19
 #' @export
14 20
 #' @examples \dontrun{
15 21
 #' splash_local %>%

+ 7
- 1
R/helpers.r View File

@@ -2,6 +2,7 @@
2 2
 #'
3 3
 #' @md
4 4
 #' @param har_resp_obj HAR response object
5
+#' @family splash_har_helpers
5 6
 #' @return A `raw` vector of the content or `NULL`
6 7
 #' @export
7 8
 get_response_body <- function(har_resp_obj) {
@@ -12,6 +13,8 @@ get_response_body <- function(har_resp_obj) {
12 13
 
13 14
 #' Retrieve or test content type of a HAR request object
14 15
 #'
16
+#' @param har_resp_obj a reponse object from [render_har()] or [execute_lua()]
17
+#' @family splash_har_helpers
15 18
 #' @export
16 19
 get_content_type <- function(har_resp_obj) {
17 20
   ctype <- har_resp_obj$response$content$mimeType
@@ -29,7 +32,6 @@ is_content_type <- function(har_resp_obj, type="application/json") {
29 32
 }
30 33
 
31 34
 #' @rdname get_content_type
32
-#' @param har_resp_obj a reponse object from [render_har()] or [execute_lua()]
33 35
 #' @export
34 36
 is_json <- function(har_resp_obj) { is_content_type(har_resp_obj) }
35 37
 
@@ -97,6 +99,7 @@ is_xhr <- function(har_resp_obj) {
97 99
 #' Retrieve request URL
98 100
 #'
99 101
 #' @param har_resp_obj HAR response object
102
+#' @family splash_har_helpers
100 103
 #' @export
101 104
 get_request_url <- function(har_resp_obj) {
102 105
   utype <- har_resp_obj$request$url
@@ -107,6 +110,7 @@ get_request_url <- function(har_resp_obj) {
107 110
 #' Retrieve or test request type
108 111
 #'
109 112
 #' @param har_resp_obj HAR response object
113
+#' @family splash_har_helpers
110 114
 #' @export
111 115
 get_request_type <- function(har_resp_obj) {
112 116
   rtype <- har_resp_obj$request$method
@@ -142,6 +146,7 @@ har_entries <- function(x) {
142 146
 #'
143 147
 #' @param x can be a `har` object, `harlog` object or `harentries` object
144 148
 #' @param i index of the HAR entry to retrieve
149
+#' @family splash_har_helpers
145 150
 #' @export
146 151
 get_har_entry <- function(x, i=1) {
147 152
   if (inherits(x, "har")) {
@@ -158,6 +163,7 @@ get_har_entry <- function(x, i=1) {
158 163
 #' Retrieves number of HAR entries in a response
159 164
 #'
160 165
 #' @param x can be a `har` object, `harlog` object or `harentries` object
166
+#' @family splash_har_helpers
161 167
 #' @export
162 168
 har_entry_count <- function(x) {
163 169
   if (inherits(x, "har")) {

+ 1
- 0
R/render-har.r View File

@@ -6,6 +6,7 @@
6 6
 #' @md
7 7
 #' @param response_body When `TRUE`, response content is included in the HAR records
8 8
 #' @inheritParams render_html
9
+#' @family splash_renderers
9 10
 #' @return a [HARtools] `har` object
10 11
 #' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html)
11 12
 #' @export

+ 15
- 5
R/render-html.r View File

@@ -6,17 +6,26 @@
6 6
 #' @param splash_obj Object created by a call to [splash()]
7 7
 #' @param url The URL to render (required)
8 8
 #' @param base_url The base url to render the page with.
9
-#' @param timeout A timeout (in seconds) for the render (defaults to 30).
9
+#' @param timeout A timeout (in seconds) for the render (defaults to 30). Without
10
+#'        reconfiguring the startup parameters of the Splash server (not this package)
11
+#'        the maximum allowed value for the timeout is 60 seconds.
10 12
 #' @param resource_timeout A timeout (in seconds) for individual network requests.
11 13
 #' @param wait Time (in seconds) to wait for updates after page is loaded (defaults to 0).
12 14
 #' @param proxy Proxy profile name or proxy URL.
13 15
 #' @param js Javascript profile name.
14 16
 #' @param js_src JavaScript code to be executed in page context.
15 17
 #' @param filters Comma-separated list of request filter names.
16
-#' @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.
17
-#' @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.
18
-#' @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.
19
-#' @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 "full".
18
+#' @param allowed_domains Comma-separated list of allowed domain names. If present, Splash
19
+#'        won’t load anything neither from domains not in this list nor from subdomains of
20
+#'        domains not in this list.
21
+#' @param allowed_content_types Comma-separated list of allowed content types. If present,
22
+#'        Splash will abort any request if the response’s content type doesn’t match any of
23
+#'        the content types in this list. Wildcards are supported.
24
+#' @param forbidden_content_types Comma-separated list of forbidden content types. If
25
+#'        present, Splash will abort any request if the response’s content type matches
26
+#'        any of the content types in this list. Wildcards are supported.
27
+#' @param viewport View width and height (in pixels) of the browser viewport to render the
28
+#'        web page. Format is “<width>x<height>”, e.g. 800x600. Default value is "full".
20 29
 #' @param images Whether to download images.
21 30
 #' @param headers HTTP headers to set for the first outgoing request.
22 31
 #' @param body Body of HTTP POST request to be sent if method is POST.
@@ -24,6 +33,7 @@
24 33
 #' @param save_args A list of argument names to put in cache.
25 34
 #' @param load_args Parameter values to load from cache
26 35
 #' @param raw_html if `TRUE` then return a character vector vs an XML document. Only valid for `render_html`
36
+#' @family splash_renderers
27 37
 #' @return An XML document. Note that this is processed by [xml2::read_html()] so it will not be
28 38
 #'         the pristine, raw, rendered HTML from the site. Use `raw_html=TRUE` if you do not want it
29 39
 #'         to be processed first by `xml2`. If you choose `raw_html=TRUE` you'll get back a

+ 1
- 0
R/render-jpg.r View File

@@ -4,6 +4,7 @@
4 4
 #' @param quality JPEG quality parameter in range from 0 to 100. Default is quality=75.
5 5
 #' @inheritParams render_html
6 6
 #' @inheritParams render_png
7
+#' @family splash_renderers
7 8
 #' @return a [magick] image object
8 9
 #' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html)
9 10
 #' @export

+ 1
- 0
R/render-json.r View File

@@ -21,6 +21,7 @@
21 21
 #'            content is not included. To enable it use `response_body` parameter.
22 22
 #' @param response_body Used with `har` parameter.
23 23
 #' @return a huge `list`
24
+#' @family splash_renderers
24 25
 #' @inheritParams render_jpeg
25 26
 #' @note All "whether to include..." parameters are default `TRUE` except for `png` and
26 27
 #'       `jpeg` and a custom `print` method is defined to stop your console from being

+ 1
- 0
R/render-png.r View File

@@ -3,6 +3,7 @@
3 3
 #' @md
4 4
 #' @param width,height Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio. These are optional
5 5
 #' @param render_all If `TRUE` extend the viewport to include the whole webpage (possibly very tall) before rendering.
6
+#' @family splash_renderers
6 7
 #' @return a [magick] image object
7 8
 #' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html)
8 9
 #' @inheritParams render_html

+ 1
- 0
R/render_file.R View File

@@ -12,6 +12,7 @@
12 12
 #' @param output either `html` or `png` to get the page content or an image capture
13 13
 #' @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.
14 14
 #' @param ... other params to [render_html()] or [render_png()]
15
+#' @family splash_renderers
15 16
 #' @return An XML document or `magick` object
16 17
 #' @export
17 18
 render_file <- function(splash_obj = splash_local, file_path, output=c("html", "png"), wait=0, viewport="1024x768", ...) {

+ 5
- 0
R/splashr.r View File

@@ -19,6 +19,7 @@ s_GET <- purrr::safely(GET)
19 19
 #'
20 20
 #' @md
21 21
 #' @param splash_obj A splash connection object
22
+#' @family splash_info_functions
22 23
 #' @return `TRUE` if Slash server is running, otherwise `FALSE`
23 24
 #' @export
24 25
 splash_active <- function(splash_obj = splash_local) {
@@ -45,6 +46,7 @@ splash_active <- function(splash_obj = splash_local) {
45 46
 #' Get Splash version information
46 47
 #'
47 48
 #' @param splash_obj A splash connection object
49
+#' @family splash_info_functions
48 50
 #' @export
49 51
 splash_version <- function(splash_obj = splash_local) {
50 52
   execute_lua(splash_obj, '
@@ -58,6 +60,7 @@ end
58 60
 #' Get information about requests/responses for the pages loaded
59 61
 #'
60 62
 #' @param splash_obj A splash connection object
63
+#' @family splash_info_functions
61 64
 #' @export
62 65
 splash_history <- function(splash_obj = splash_local) {
63 66
   execute_lua(splash_obj, '
@@ -72,6 +75,7 @@ end
72 75
 #' Get Splash performance-related statistics
73 76
 #'
74 77
 #' @param splash_obj A splash connection object
78
+#' @family splash_info_functions
75 79
 #' @export
76 80
 splash_perf_stats <- function(splash_obj = splash_local) {
77 81
   execute_lua(splash_obj, '
@@ -85,6 +89,7 @@ end
85 89
 #' Retrieve debug-level info for a Splash server
86 90
 #'
87 91
 #' @param splash_obj A splash connection object
92
+#' @family splash_info_functions
88 93
 #' @export
89 94
 splash_debug <- function(splash_obj = splash_local) {
90 95
 

+ 14
- 3
man/execute_lua.Rd View File

@@ -12,9 +12,13 @@ execute_lua(splash_obj, lua_source, timeout = 30, allowed_domains, proxy,
12 12
 
13 13
 \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.}
14 14
 
15
-\item{timeout}{A timeout (in seconds) for the render (defaults to 30).}
15
+\item{timeout}{A timeout (in seconds) for the render (defaults to 30). Without
16
+reconfiguring the startup parameters of the Splash server (not this package)
17
+the maximum allowed value for the timeout is 60 seconds.}
16 18
 
17
-\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.}
19
+\item{allowed_domains}{Comma-separated list of allowed domain names. If present, Splash
20
+won’t load anything neither from domains not in this list nor from subdomains of
21
+domains not in this list.}
18 22
 
19 23
 \item{proxy}{Proxy profile name or proxy URL.}
20 24
 
@@ -25,7 +29,8 @@ execute_lua(splash_obj, lua_source, timeout = 30, allowed_domains, proxy,
25 29
 \item{load_args}{Parameter values to load from cache}
26 30
 }
27 31
 \value{
28
-\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.
32
+\code{raw} content from the \code{httr} call. Given the vast diversity of possible return
33
+values, it's up to the caller to handle the return value.
29 34
 }
30 35
 \description{
31 36
 Execute a custom rendering script and return a result.
@@ -48,3 +53,9 @@ rawToChar(res) \%>\%
48 53
 member_scores
49 54
 }
50 55
 }
56
+\seealso{
57
+Other splash_renderers: \code{\link{render_file}},
58
+  \code{\link{render_har}}, \code{\link{render_html}},
59
+  \code{\link{render_jpeg}}, \code{\link{render_json}},
60
+  \code{\link{render_png}}
61
+}

+ 8
- 0
man/get_content_size.Rd View File

@@ -18,3 +18,11 @@ get_headers_size(har_resp_obj)
18 18
 \description{
19 19
 Retrieve size of content | body | headers
20 20
 }
21
+\seealso{
22
+Other splash_har_helpers: \code{\link{get_content_type}},
23
+  \code{\link{get_har_entry}},
24
+  \code{\link{get_request_type}},
25
+  \code{\link{get_request_url}},
26
+  \code{\link{get_response_body}},
27
+  \code{\link{har_entry_count}}
28
+}

+ 8
- 0
man/get_content_type.Rd View File

@@ -53,3 +53,11 @@ is_xhr(har_resp_obj)
53 53
 \description{
54 54
 Retrieve or test content type of a HAR request object
55 55
 }
56
+\seealso{
57
+Other splash_har_helpers: \code{\link{get_content_size}},
58
+  \code{\link{get_har_entry}},
59
+  \code{\link{get_request_type}},
60
+  \code{\link{get_request_url}},
61
+  \code{\link{get_response_body}},
62
+  \code{\link{har_entry_count}}
63
+}

+ 8
- 0
man/get_har_entry.Rd View File

@@ -14,3 +14,11 @@ get_har_entry(x, i = 1)
14 14
 \description{
15 15
 Retrieve an entry by index from a HAR object
16 16
 }
17
+\seealso{
18
+Other splash_har_helpers: \code{\link{get_content_size}},
19
+  \code{\link{get_content_type}},
20
+  \code{\link{get_request_type}},
21
+  \code{\link{get_request_url}},
22
+  \code{\link{get_response_body}},
23
+  \code{\link{har_entry_count}}
24
+}

+ 8
- 0
man/get_request_type.Rd View File

@@ -18,3 +18,11 @@ is_post(har_resp_obj)
18 18
 \description{
19 19
 Retrieve or test request type
20 20
 }
21
+\seealso{
22
+Other splash_har_helpers: \code{\link{get_content_size}},
23
+  \code{\link{get_content_type}},
24
+  \code{\link{get_har_entry}},
25
+  \code{\link{get_request_url}},
26
+  \code{\link{get_response_body}},
27
+  \code{\link{har_entry_count}}
28
+}

+ 8
- 0
man/get_request_url.Rd View File

@@ -12,3 +12,11 @@ get_request_url(har_resp_obj)
12 12
 \description{
13 13
 Retrieve request URL
14 14
 }
15
+\seealso{
16
+Other splash_har_helpers: \code{\link{get_content_size}},
17
+  \code{\link{get_content_type}},
18
+  \code{\link{get_har_entry}},
19
+  \code{\link{get_request_type}},
20
+  \code{\link{get_response_body}},
21
+  \code{\link{har_entry_count}}
22
+}

+ 8
- 0
man/get_response_body.Rd View File

@@ -15,3 +15,11 @@ A \code{raw} vector of the content or \code{NULL}
15 15
 \description{
16 16
 Retrieve the body content of a HAR entry
17 17
 }
18
+\seealso{
19
+Other splash_har_helpers: \code{\link{get_content_size}},
20
+  \code{\link{get_content_type}},
21
+  \code{\link{get_har_entry}},
22
+  \code{\link{get_request_type}},
23
+  \code{\link{get_request_url}},
24
+  \code{\link{har_entry_count}}
25
+}

+ 8
- 0
man/har_entry_count.Rd View File

@@ -12,3 +12,11 @@ har_entry_count(x)
12 12
 \description{
13 13
 Retrieves number of HAR entries in a response
14 14
 }
15
+\seealso{
16
+Other splash_har_helpers: \code{\link{get_content_size}},
17
+  \code{\link{get_content_type}},
18
+  \code{\link{get_har_entry}},
19
+  \code{\link{get_request_type}},
20
+  \code{\link{get_request_url}},
21
+  \code{\link{get_response_body}}
22
+}

+ 4
- 0
man/install_splash.Rd View File

@@ -22,3 +22,7 @@ splash_container <- start_splash()
22 22
 stop_splash(splash_container)
23 23
 }
24 24
 }
25
+\seealso{
26
+Other splash_docker_helpers: \code{\link{start_splash}},
27
+  \code{\link{stop_splash}}
28
+}

+ 6
- 0
man/render_file.Rd View File

@@ -30,3 +30,9 @@ The suggested use-case for this is rendering a widget
30 30
 TODO Test if container is running
31 31
 TODO Enable passing in of an htmlwidget and use saveWidget
32 32
 }
33
+\seealso{
34
+Other splash_renderers: \code{\link{execute_lua}},
35
+  \code{\link{render_har}}, \code{\link{render_html}},
36
+  \code{\link{render_jpeg}}, \code{\link{render_json}},
37
+  \code{\link{render_png}}
38
+}

+ 20
- 5
man/render_har.Rd View File

@@ -19,7 +19,9 @@ render_har(splash_obj = splash_local, url, base_url, response_body = FALSE,
19 19
 
20 20
 \item{response_body}{When \code{TRUE}, response content is included in the HAR records}
21 21
 
22
-\item{timeout}{A timeout (in seconds) for the render (defaults to 30).}
22
+\item{timeout}{A timeout (in seconds) for the render (defaults to 30). Without
23
+reconfiguring the startup parameters of the Splash server (not this package)
24
+the maximum allowed value for the timeout is 60 seconds.}
23 25
 
24 26
 \item{resource_timeout}{A timeout (in seconds) for individual network requests.}
25 27
 
@@ -33,13 +35,20 @@ render_har(splash_obj = splash_local, url, base_url, response_body = FALSE,
33 35
 
34 36
 \item{filters}{Comma-separated list of request filter names.}
35 37
 
36
-\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.}
38
+\item{allowed_domains}{Comma-separated list of allowed domain names. If present, Splash
39
+won’t load anything neither from domains not in this list nor from subdomains of
40
+domains not in this list.}
37 41
 
38
-\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.}
42
+\item{allowed_content_types}{Comma-separated list of allowed content types. If present,
43
+Splash will abort any request if the response’s content type doesn’t match any of
44
+the content types in this list. Wildcards are supported.}
39 45
 
40
-\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.}
46
+\item{forbidden_content_types}{Comma-separated list of forbidden content types. If
47
+present, Splash will abort any request if the response’s content type matches
48
+any of the content types in this list. Wildcards are supported.}
41 49
 
42
-\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 "full".}
50
+\item{viewport}{View width and height (in pixels) of the browser viewport to render the
51
+web page. Format is “<width>x<height>”, e.g. 800x600. Default value is "full".}
43 52
 
44 53
 \item{images}{Whether to download images.}
45 54
 
@@ -63,3 +72,9 @@ is incredibly detailed, full of information on every component loaded.
63 72
 \references{
64 73
 \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs}
65 74
 }
75
+\seealso{
76
+Other splash_renderers: \code{\link{execute_lua}},
77
+  \code{\link{render_file}}, \code{\link{render_html}},
78
+  \code{\link{render_jpeg}}, \code{\link{render_json}},
79
+  \code{\link{render_png}}
80
+}

+ 20
- 5
man/render_html.Rd View File

@@ -16,7 +16,9 @@ render_html(splash_obj = splash_local, url, base_url, timeout = 30,
16 16
 
17 17
 \item{base_url}{The base url to render the page with.}
18 18
 
19
-\item{timeout}{A timeout (in seconds) for the render (defaults to 30).}
19
+\item{timeout}{A timeout (in seconds) for the render (defaults to 30). Without
20
+reconfiguring the startup parameters of the Splash server (not this package)
21
+the maximum allowed value for the timeout is 60 seconds.}
20 22
 
21 23
 \item{resource_timeout}{A timeout (in seconds) for individual network requests.}
22 24
 
@@ -30,13 +32,20 @@ render_html(splash_obj = splash_local, url, base_url, timeout = 30,
30 32
 
31 33
 \item{filters}{Comma-separated list of request filter names.}
32 34
 
33
-\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.}
35
+\item{allowed_domains}{Comma-separated list of allowed domain names. If present, Splash
36
+won’t load anything neither from domains not in this list nor from subdomains of
37
+domains not in this list.}
34 38
 
35
-\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.}
39
+\item{allowed_content_types}{Comma-separated list of allowed content types. If present,
40
+Splash will abort any request if the response’s content type doesn’t match any of
41
+the content types in this list. Wildcards are supported.}
36 42
 
37
-\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.}
43
+\item{forbidden_content_types}{Comma-separated list of forbidden content types. If
44
+present, Splash will abort any request if the response’s content type matches
45
+any of the content types in this list. Wildcards are supported.}
38 46
 
39
-\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 "full".}
47
+\item{viewport}{View width and height (in pixels) of the browser viewport to render the
48
+web page. Format is “<width>x<height>”, e.g. 800x600. Default value is "full".}
40 49
 
41 50
 \item{images}{Whether to download images.}
42 51
 
@@ -64,3 +73,9 @@ Similar to \code{rvest::read_html}.
64 73
 \references{
65 74
 \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs}
66 75
 }
76
+\seealso{
77
+Other splash_renderers: \code{\link{execute_lua}},
78
+  \code{\link{render_file}}, \code{\link{render_har}},
79
+  \code{\link{render_jpeg}}, \code{\link{render_json}},
80
+  \code{\link{render_png}}
81
+}

+ 20
- 5
man/render_jpeg.Rd View File

@@ -23,7 +23,9 @@ render_jpeg(splash_obj = splash_local, url, base_url = NULL, quality = 75,
23 23
 
24 24
 \item{height}{Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio. These are optional}
25 25
 
26
-\item{timeout}{A timeout (in seconds) for the render (defaults to 30).}
26
+\item{timeout}{A timeout (in seconds) for the render (defaults to 30). Without
27
+reconfiguring the startup parameters of the Splash server (not this package)
28
+the maximum allowed value for the timeout is 60 seconds.}
27 29
 
28 30
 \item{resource_timeout}{A timeout (in seconds) for individual network requests.}
29 31
 
@@ -39,13 +41,20 @@ render_jpeg(splash_obj = splash_local, url, base_url = NULL, quality = 75,
39 41
 
40 42
 \item{filters}{Comma-separated list of request filter names.}
41 43
 
42
-\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.}
44
+\item{allowed_domains}{Comma-separated list of allowed domain names. If present, Splash
45
+won’t load anything neither from domains not in this list nor from subdomains of
46
+domains not in this list.}
43 47
 
44
-\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.}
48
+\item{allowed_content_types}{Comma-separated list of allowed content types. If present,
49
+Splash will abort any request if the response’s content type doesn’t match any of
50
+the content types in this list. Wildcards are supported.}
45 51
 
46
-\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.}
52
+\item{forbidden_content_types}{Comma-separated list of forbidden content types. If
53
+present, Splash will abort any request if the response’s content type matches
54
+any of the content types in this list. Wildcards are supported.}
47 55
 
48
-\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 "full".}
56
+\item{viewport}{View width and height (in pixels) of the browser viewport to render the
57
+web page. Format is “<width>x<height>”, e.g. 800x600. Default value is "full".}
49 58
 
50 59
 \item{images}{Whether to download images.}
51 60
 
@@ -68,3 +77,9 @@ Return a image (in JPEG format) of the javascript-rendered page.
68 77
 \references{
69 78
 \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs}
70 79
 }
80
+\seealso{
81
+Other splash_renderers: \code{\link{execute_lua}},
82
+  \code{\link{render_file}}, \code{\link{render_har}},
83
+  \code{\link{render_html}}, \code{\link{render_json}},
84
+  \code{\link{render_png}}
85
+}

+ 20
- 5
man/render_json.Rd View File

@@ -25,7 +25,9 @@ render_json(splash_obj = splash_local, url, base_url = NULL, quality = 75,
25 25
 
26 26
 \item{height}{Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio. These are optional}
27 27
 
28
-\item{timeout}{A timeout (in seconds) for the render (defaults to 30).}
28
+\item{timeout}{A timeout (in seconds) for the render (defaults to 30). Without
29
+reconfiguring the startup parameters of the Splash server (not this package)
30
+the maximum allowed value for the timeout is 60 seconds.}
29 31
 
30 32
 \item{resource_timeout}{A timeout (in seconds) for individual network requests.}
31 33
 
@@ -41,13 +43,20 @@ render_json(splash_obj = splash_local, url, base_url = NULL, quality = 75,
41 43
 
42 44
 \item{filters}{Comma-separated list of request filter names.}
43 45
 
44
-\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.}
46
+\item{allowed_domains}{Comma-separated list of allowed domain names. If present, Splash
47
+won’t load anything neither from domains not in this list nor from subdomains of
48
+domains not in this list.}
45 49
 
46
-\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.}
50
+\item{allowed_content_types}{Comma-separated list of allowed content types. If present,
51
+Splash will abort any request if the response’s content type doesn’t match any of
52
+the content types in this list. Wildcards are supported.}
47 53
 
48
-\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.}
54
+\item{forbidden_content_types}{Comma-separated list of forbidden content types. If
55
+present, Splash will abort any request if the response’s content type matches
56
+any of the content types in this list. Wildcards are supported.}
49 57
 
50
-\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 "full".}
58
+\item{viewport}{View width and height (in pixels) of the browser viewport to render the
59
+web page. Format is “<width>x<height>”, e.g. 800x600. Default value is "full".}
51 60
 
52 61
 \item{images}{Whether to download images.}
53 62
 
@@ -100,3 +109,9 @@ overwhelmed with data. Use \code{\link[=str]{str()}} to inspect various portions
100 109
 \references{
101 110
 \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs}
102 111
 }
112
+\seealso{
113
+Other splash_renderers: \code{\link{execute_lua}},
114
+  \code{\link{render_file}}, \code{\link{render_har}},
115
+  \code{\link{render_html}}, \code{\link{render_jpeg}},
116
+  \code{\link{render_png}}
117
+}

+ 20
- 5
man/render_png.Rd View File

@@ -19,7 +19,9 @@ render_png(splash_obj = splash_local, url, base_url = NULL, width, height,
19 19
 
20 20
 \item{width, height}{Resize the rendered image to the given width/height (in pixels) keeping the aspect ratio. These are optional}
21 21
 
22
-\item{timeout}{A timeout (in seconds) for the render (defaults to 30).}
22
+\item{timeout}{A timeout (in seconds) for the render (defaults to 30). Without
23
+reconfiguring the startup parameters of the Splash server (not this package)
24
+the maximum allowed value for the timeout is 60 seconds.}
23 25
 
24 26
 \item{resource_timeout}{A timeout (in seconds) for individual network requests.}
25 27
 
@@ -35,13 +37,20 @@ render_png(splash_obj = splash_local, url, base_url = NULL, width, height,
35 37
 
36 38
 \item{filters}{Comma-separated list of request filter names.}
37 39
 
38
-\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.}
40
+\item{allowed_domains}{Comma-separated list of allowed domain names. If present, Splash
41
+won’t load anything neither from domains not in this list nor from subdomains of
42
+domains not in this list.}
39 43
 
40
-\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.}
44
+\item{allowed_content_types}{Comma-separated list of allowed content types. If present,
45
+Splash will abort any request if the response’s content type doesn’t match any of
46
+the content types in this list. Wildcards are supported.}
41 47
 
42
-\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.}
48
+\item{forbidden_content_types}{Comma-separated list of forbidden content types. If
49
+present, Splash will abort any request if the response’s content type matches
50
+any of the content types in this list. Wildcards are supported.}
43 51
 
44
-\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 "full".}
52
+\item{viewport}{View width and height (in pixels) of the browser viewport to render the
53
+web page. Format is “<width>x<height>”, e.g. 800x600. Default value is "full".}
45 54
 
46 55
 \item{images}{Whether to download images.}
47 56
 
@@ -64,3 +73,9 @@ Return a image (in PNG format) of the javascript-rendered page.
64 73
 \references{
65 74
 \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs}
66 75
 }
76
+\seealso{
77
+Other splash_renderers: \code{\link{execute_lua}},
78
+  \code{\link{render_file}}, \code{\link{render_har}},
79
+  \code{\link{render_html}}, \code{\link{render_jpeg}},
80
+  \code{\link{render_json}}
81
+}

+ 6
- 0
man/splash_active.Rd View File

@@ -15,3 +15,9 @@ splash_active(splash_obj = splash_local)
15 15
 \description{
16 16
 Test if a Splash server is up
17 17
 }
18
+\seealso{
19
+Other splash_info_functions: \code{\link{splash_debug}},
20
+  \code{\link{splash_history}},
21
+  \code{\link{splash_perf_stats}},
22
+  \code{\link{splash_version}}
23
+}

+ 9
- 0
man/splash_add_lua.Rd View File

@@ -26,3 +26,12 @@ end
26 26
 
27 27
 If you need more flexibility, use the \code{\link[=execute_lua]{execute_lua()}} function.
28 28
 }
29
+\seealso{
30
+Other splash_dsl_functions: \code{\link{splash_click}},
31
+  \code{\link{splash_focus}}, \code{\link{splash_go}},
32
+  \code{\link{splash_har_reset}}, \code{\link{splash_har}},
33
+  \code{\link{splash_html}}, \code{\link{splash_png}},
34
+  \code{\link{splash_press}}, \code{\link{splash_release}},
35
+  \code{\link{splash_send_keys}},
36
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
37
+}

+ 9
- 0
man/splash_click.Rd View File

@@ -14,3 +14,12 @@ splash_click(splash_obj, x, y)
14 14
 \description{
15 15
 Trigger mouse click event in web page.
16 16
 }
17
+\seealso{
18
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
19
+  \code{\link{splash_focus}}, \code{\link{splash_go}},
20
+  \code{\link{splash_har_reset}}, \code{\link{splash_har}},
21
+  \code{\link{splash_html}}, \code{\link{splash_png}},
22
+  \code{\link{splash_press}}, \code{\link{splash_release}},
23
+  \code{\link{splash_send_keys}},
24
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
25
+}

+ 6
- 0
man/splash_debug.Rd View File

@@ -15,4 +15,10 @@ splash_debug(splash_obj = splash_local)
15 15
 \description{
16 16
 Retrieve debug-level info for a Splash server
17 17
 }
18
+\seealso{
19
+Other splash_info_functions: \code{\link{splash_active}},
20
+  \code{\link{splash_history}},
21
+  \code{\link{splash_perf_stats}},
22
+  \code{\link{splash_version}}
23
+}
18 24
 \keyword{internal}

+ 34
- 0
man/splash_enable_javascript.Rd View File

@@ -0,0 +1,34 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/dsl.r
3
+\name{splash_enable_javascript}
4
+\alias{splash_enable_javascript}
5
+\title{Enable or disable execution of JavaSript code embedded in the page.}
6
+\usage{
7
+splash_enable_javascript(splash_obj, enable = TRUE)
8
+}
9
+\arguments{
10
+\item{splash_obj}{splashr object}
11
+
12
+\item{enable}{logical}
13
+}
14
+\description{
15
+JavaScript execution is enabled by default.
16
+}
17
+\examples{
18
+\dontrun{
19
+splash_local \%>\%
20
+  splash_response_body(TRUE) \%>\%
21
+  splash_private_mode(TRUE) \%>\%
22
+  splash_enable_javascript(FALSE) \%>\%
23
+  splash_user_agent(ua_macos_chrome) \%>\%
24
+  splash_go("https://rud.is/b") \%>\%
25
+  splash_wait(2) \%>\%
26
+  splash_har() -> rud_har
27
+}
28
+}
29
+\seealso{
30
+Other splash_dsl_attributes: \code{\link{splash_images}},
31
+  \code{\link{splash_plugins}},
32
+  \code{\link{splash_private_mode}},
33
+  \code{\link{splash_response_body}}
34
+}

+ 9
- 0
man/splash_focus.Rd View File

@@ -17,3 +17,12 @@ Focus on a document element provided by a CSS selector
17 17
 \references{
18 18
 See \href{https://splash.readthedocs.io/en/stable/scripting-ref.html#splash-send-text}{the docs} for more info
19 19
 }
20
+\seealso{
21
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
22
+  \code{\link{splash_click}}, \code{\link{splash_go}},
23
+  \code{\link{splash_har_reset}}, \code{\link{splash_har}},
24
+  \code{\link{splash_html}}, \code{\link{splash_png}},
25
+  \code{\link{splash_press}}, \code{\link{splash_release}},
26
+  \code{\link{splash_send_keys}},
27
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
28
+}

+ 9
- 0
man/splash_go.Rd View File

@@ -25,3 +25,12 @@ splash_local \%>\%
25 25
   splash_har() -> rud_har
26 26
 }
27 27
 }
28
+\seealso{
29
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
30
+  \code{\link{splash_click}}, \code{\link{splash_focus}},
31
+  \code{\link{splash_har_reset}}, \code{\link{splash_har}},
32
+  \code{\link{splash_html}}, \code{\link{splash_png}},
33
+  \code{\link{splash_press}}, \code{\link{splash_release}},
34
+  \code{\link{splash_send_keys}},
35
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
36
+}

+ 9
- 0
man/splash_har.Rd View File

@@ -23,3 +23,12 @@ splash_local \%>\%
23 23
   splash_har() -> rud_har
24 24
 }
25 25
 }
26
+\seealso{
27
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
28
+  \code{\link{splash_click}}, \code{\link{splash_focus}},
29
+  \code{\link{splash_go}}, \code{\link{splash_har_reset}},
30
+  \code{\link{splash_html}}, \code{\link{splash_png}},
31
+  \code{\link{splash_press}}, \code{\link{splash_release}},
32
+  \code{\link{splash_send_keys}},
33
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
34
+}

+ 9
- 0
man/splash_har_reset.Rd View File

@@ -12,3 +12,12 @@ splash_har_reset(splash_obj)
12 12
 \description{
13 13
 Drops all internally stored HAR records.
14 14
 }
15
+\seealso{
16
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
17
+  \code{\link{splash_click}}, \code{\link{splash_focus}},
18
+  \code{\link{splash_go}}, \code{\link{splash_har}},
19
+  \code{\link{splash_html}}, \code{\link{splash_png}},
20
+  \code{\link{splash_press}}, \code{\link{splash_release}},
21
+  \code{\link{splash_send_keys}},
22
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
23
+}

+ 6
- 0
man/splash_history.Rd View File

@@ -12,3 +12,9 @@ splash_history(splash_obj = splash_local)
12 12
 \description{
13 13
 Get information about requests/responses for the pages loaded
14 14
 }
15
+\seealso{
16
+Other splash_info_functions: \code{\link{splash_active}},
17
+  \code{\link{splash_debug}},
18
+  \code{\link{splash_perf_stats}},
19
+  \code{\link{splash_version}}
20
+}

+ 9
- 0
man/splash_html.Rd View File

@@ -25,3 +25,12 @@ splash_local \%>\%
25 25
   splash_html() -> rud_pg
26 26
 }
27 27
 }
28
+\seealso{
29
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
30
+  \code{\link{splash_click}}, \code{\link{splash_focus}},
31
+  \code{\link{splash_go}}, \code{\link{splash_har_reset}},
32
+  \code{\link{splash_har}}, \code{\link{splash_png}},
33
+  \code{\link{splash_press}}, \code{\link{splash_release}},
34
+  \code{\link{splash_send_keys}},
35
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
36
+}

+ 6
- 0
man/splash_images.Rd View File

@@ -27,3 +27,9 @@ splash_local \%>\%
27 27
   splash_har() -> rud_har
28 28
 }
29 29
 }
30
+\seealso{
31
+Other splash_dsl_attributes: \code{\link{splash_enable_javascript}},
32
+  \code{\link{splash_plugins}},
33
+  \code{\link{splash_private_mode}},
34
+  \code{\link{splash_response_body}}
35
+}

+ 5
- 0
man/splash_perf_stats.Rd View File

@@ -12,3 +12,8 @@ splash_perf_stats(splash_obj = splash_local)
12 12
 \description{
13 13
 Get Splash performance-related statistics
14 14
 }
15
+\seealso{
16
+Other splash_info_functions: \code{\link{splash_active}},
17
+  \code{\link{splash_debug}}, \code{\link{splash_history}},
18
+  \code{\link{splash_version}}
19
+}

+ 6
- 0
man/splash_plugins.Rd View File

@@ -24,3 +24,9 @@ splash_local \%>\%
24 24
   splash_har() -> rud_har
25 25
 }
26 26
 }
27
+\seealso{
28
+Other splash_dsl_attributes: \code{\link{splash_enable_javascript}},
29
+  \code{\link{splash_images}},
30
+  \code{\link{splash_private_mode}},
31
+  \code{\link{splash_response_body}}
32
+}

+ 9
- 0
man/splash_png.Rd View File

@@ -25,3 +25,12 @@ splash_local \%>\%
25 25
   splash_png()
26 26
 }
27 27
 }
28
+\seealso{
29
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
30
+  \code{\link{splash_click}}, \code{\link{splash_focus}},
31
+  \code{\link{splash_go}}, \code{\link{splash_har_reset}},
32
+  \code{\link{splash_har}}, \code{\link{splash_html}},
33
+  \code{\link{splash_press}}, \code{\link{splash_release}},
34
+  \code{\link{splash_send_keys}},
35
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
36
+}

+ 9
- 0
man/splash_press.Rd View File

@@ -14,3 +14,12 @@ splash_press(splash_obj, x, y)
14 14
 \description{
15 15
 Trigger mouse press event in web page.
16 16
 }
17
+\seealso{
18
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
19
+  \code{\link{splash_click}}, \code{\link{splash_focus}},
20
+  \code{\link{splash_go}}, \code{\link{splash_har_reset}},
21
+  \code{\link{splash_har}}, \code{\link{splash_html}},
22
+  \code{\link{splash_png}}, \code{\link{splash_release}},
23
+  \code{\link{splash_send_keys}},
24
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
25
+}

+ 35
- 0
man/splash_private_mode.Rd View File

@@ -0,0 +1,35 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/dsl.r
3
+\name{splash_private_mode}
4
+\alias{splash_private_mode}
5
+\title{Enable or disable execution of JavaSript code embedded in the page.}
6
+\usage{
7
+splash_private_mode(splash_obj, enable = FALSE)
8
+}
9
+\arguments{
10
+\item{splash_obj}{splashr object}
11
+
12
+\item{enable}{logical}
13
+}
14
+\description{
15
+Private mode is enabled by default unless you pass flag \code{--disable-private-mode}
16
+at Splash (server) startup. Note that if you disable private mode browsing data such
17
+as cookies or items kept in local storage may persist between requests.
18
+}
19
+\examples{
20
+\dontrun{
21
+splash_local \%>\%
22
+  splash_response_body(TRUE) \%>\%
23
+  splash_private_mode(TRUE) \%>\%
24
+  splash_user_agent(ua_macos_chrome) \%>\%
25
+  splash_go("https://rud.is/b") \%>\%
26
+  splash_wait(2) \%>\%
27
+  splash_har() -> rud_har
28
+}
29
+}
30
+\seealso{
31
+Other splash_dsl_attributes: \code{\link{splash_enable_javascript}},
32
+  \code{\link{splash_images}},
33
+  \code{\link{splash_plugins}},
34
+  \code{\link{splash_response_body}}
35
+}

+ 9
- 0
man/splash_release.Rd View File

@@ -14,3 +14,12 @@ splash_release(splash_obj, x, y)
14 14
 \description{
15 15
 Trigger mouse release event in web page.
16 16
 }
17
+\seealso{
18
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
19
+  \code{\link{splash_click}}, \code{\link{splash_focus}},
20
+  \code{\link{splash_go}}, \code{\link{splash_har_reset}},
21
+  \code{\link{splash_har}}, \code{\link{splash_html}},
22
+  \code{\link{splash_png}}, \code{\link{splash_press}},
23
+  \code{\link{splash_send_keys}},
24
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
25
+}

+ 6
- 0
man/splash_response_body.Rd View File

@@ -24,3 +24,9 @@ splash_local \%>\%
24 24
   splash_har() -> rud_har
25 25
 }
26 26
 }
27
+\seealso{
28
+Other splash_dsl_attributes: \code{\link{splash_enable_javascript}},
29
+  \code{\link{splash_images}},
30
+  \code{\link{splash_plugins}},
31
+  \code{\link{splash_private_mode}}
32
+}

+ 9
- 0
man/splash_send_keys.Rd View File

@@ -23,3 +23,12 @@ This is different from \code{\link[=splash_send_text]{splash_send_text()}}
23 23
 \references{
24 24
 See \href{https://splash.readthedocs.io/en/stable/scripting-ref.html#splash-send-keys}{the docs} for more info
25 25
 }
26
+\seealso{
27
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
28
+  \code{\link{splash_click}}, \code{\link{splash_focus}},
29
+  \code{\link{splash_go}}, \code{\link{splash_har_reset}},
30
+  \code{\link{splash_har}}, \code{\link{splash_html}},
31
+  \code{\link{splash_png}}, \code{\link{splash_press}},
32
+  \code{\link{splash_release}},
33
+  \code{\link{splash_send_text}}, \code{\link{splash_wait}}
34
+}

+ 9
- 0
man/splash_send_text.Rd View File

@@ -20,3 +20,12 @@ This adds a call to \code{splash:wait} so you do not have to
20 20
 \references{
21 21
 See \href{https://splash.readthedocs.io/en/stable/scripting-ref.html#splash-send-keys}{the docs} for more info
22 22
 }
23
+\seealso{
24
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
25
+  \code{\link{splash_click}}, \code{\link{splash_focus}},
26
+  \code{\link{splash_go}}, \code{\link{splash_har_reset}},
27
+  \code{\link{splash_har}}, \code{\link{splash_html}},
28
+  \code{\link{splash_png}}, \code{\link{splash_press}},
29
+  \code{\link{splash_release}},
30
+  \code{\link{splash_send_keys}}, \code{\link{splash_wait}}
31
+}

+ 5
- 0
man/splash_version.Rd View File

@@ -12,3 +12,8 @@ splash_version(splash_obj = splash_local)
12 12
 \description{
13 13
 Get Splash version information
14 14
 }
15
+\seealso{
16
+Other splash_info_functions: \code{\link{splash_active}},
17
+  \code{\link{splash_debug}}, \code{\link{splash_history}},
18
+  \code{\link{splash_perf_stats}}
19
+}

+ 10
- 0
man/splash_wait.Rd View File

@@ -24,3 +24,13 @@ splash_local \%>\%
24 24
   splash_har() -> rud_har
25 25
 }
26 26
 }
27
+\seealso{
28
+Other splash_dsl_functions: \code{\link{splash_add_lua}},
29
+  \code{\link{splash_click}}, \code{\link{splash_focus}},
30
+  \code{\link{splash_go}}, \code{\link{splash_har_reset}},
31
+  \code{\link{splash_har}}, \code{\link{splash_html}},
32
+  \code{\link{splash_png}}, \code{\link{splash_press}},
33
+  \code{\link{splash_release}},
34
+  \code{\link{splash_send_keys}},
35
+  \code{\link{splash_send_text}}
36
+}

+ 4
- 0
man/start_splash.Rd View File

@@ -35,3 +35,7 @@ splash_container <- start_splash()
35 35
 stop_splash(splash_container)
36 36
 }
37 37
 }
38
+\seealso{
39
+Other splash_docker_helpers: \code{\link{install_splash}},
40
+  \code{\link{stop_splash}}
41
+}

+ 4
- 0
man/stop_splash.Rd View File

@@ -24,3 +24,7 @@ splash_container <- start_splash()
24 24
 stop_splash(splash_container)
25 25
 }
26 26
 }
27
+\seealso{
28
+Other splash_docker_helpers: \code{\link{install_splash}},
29
+  \code{\link{start_splash}}
30
+}

Loading…
Cancel
Save