Tools to Work with the 'Splash' JavaScript Rendering Service in R
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

122 строки

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/render-json.R
  3. \name{render_json}
  4. \alias{render_json}
  5. \title{Return a json-encoded dictionary with information about javascript-rendered webpage.}
  6. \usage{
  7. render_json(splash_obj = splash_local, url, base_url = NULL,
  8. quality = 75, width, height, timeout = 30, resource_timeout,
  9. wait = 0, render_all = FALSE, proxy, js, js_src, filters,
  10. allowed_domains, allowed_content_types, forbidden_content_types,
  11. viewport = "1024x768", images, headers, body, http_method, save_args,
  12. load_args, html = TRUE, png = FALSE, jpeg = FALSE,
  13. iframes = TRUE, script = TRUE, console = TRUE, history = TRUE,
  14. har = TRUE, response_body = FALSE)
  15. }
  16. \arguments{
  17. \item{splash_obj}{Object created by a call to \code{\link[=splash]{splash()}}}
  18. \item{url}{The URL to render (required)}
  19. \item{base_url}{The base url to render the page with.}
  20. \item{quality}{JPEG quality parameter in range from 0 to 100. Default is quality=75.}
  21. \item{width}{Resize the rendered image to the given width/height (in
  22. pixels) keeping the aspect ratio. These are optional}
  23. \item{height}{Resize the rendered image to the given width/height (in
  24. pixels) keeping the aspect ratio. These are optional}
  25. \item{timeout}{A timeout (in seconds) for the render (defaults to 30). Without
  26. reconfiguring the startup parameters of the Splash server (not this package)
  27. the maximum allowed value for the timeout is 60 seconds.}
  28. \item{resource_timeout}{A timeout (in seconds) for individual network requests.}
  29. \item{wait}{Time (in seconds) to wait for updates after page is loaded (defaults to 0).}
  30. \item{render_all}{If \code{TRUE} extend the viewport to include the whole webpage
  31. (possibly very tall) before rendering.}
  32. \item{proxy}{Proxy profile name or proxy URL.}
  33. \item{js}{Javascript profile name.}
  34. \item{js_src}{JavaScript code to be executed in page context.}
  35. \item{filters}{Comma-separated list of request filter names.}
  36. \item{allowed_domains}{Comma-separated list of allowed domain names. If present, Splash
  37. won’t load anything neither from domains not in this list nor from subdomains of
  38. domains not in this list.}
  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.}
  42. \item{forbidden_content_types}{Comma-separated list of forbidden content types. If
  43. present, Splash will abort any request if the response’s content type matches
  44. any of the content types in this list. Wildcards are supported.}
  45. \item{viewport}{View width and height (in pixels) of the browser viewport to render the
  46. web page. Format is “<width>x<height>”, e.g. 800x600. Default value is "full".}
  47. \item{images}{Whether to download images.}
  48. \item{headers}{HTTP headers to set for the first outgoing request.}
  49. \item{body}{Body of HTTP POST request to be sent if method is POST.}
  50. \item{http_method}{HTTP method of outgoing Splash request.}
  51. \item{save_args}{A list of argument names to put in cache.}
  52. \item{load_args}{Parameter values to load from cache}
  53. \item{html}{Whether to include HTML in output.}
  54. \item{png}{Whether to include PNG in output.}
  55. \item{jpeg}{Whether to include JPEG in output.}
  56. \item{iframes}{Whether to include information about child frames in output.}
  57. \item{script}{Whether to include the result of the custom executed javascript final
  58. statement in output}
  59. \item{console}{Whether to include the executed javascript console messages in output.}
  60. \item{history}{Whether to include the history of requests/responses for webpage main frame.
  61. Use it to get HTTP status codes and headers. Only information about "main"
  62. requests/responses is returned (i.e. information about related resources
  63. like images and AJAX queries is not returned). To get information about all
  64. requests and responses use \code{har} parameter.}
  65. \item{har}{Whether to include HAR in output. If \code{TRUE} the result will contain the same
  66. data as \code{\link[=render_har]{render_har()}} provides under \code{har} list entry. By default, response
  67. content is not included. To enable it use \code{response_body} parameter.}
  68. \item{response_body}{Used with \code{har} parameter.}
  69. }
  70. \value{
  71. a huge \code{list}
  72. }
  73. \description{
  74. It can include HTML, PNG and other information, based on arguments passed.
  75. }
  76. \note{
  77. All "whether to include..." parameters are default \code{TRUE} except for \code{png} and
  78. \code{jpeg} and a custom \code{print} method is defined to stop your console from being
  79. overwhelmed with data. Use \code{\link[=str]{str()}} to inspect various portions of the result.
  80. }
  81. \references{
  82. \href{}{Splash docs}
  83. }
  84. \seealso{
  85. Other splash_renderers: \code{\link{execute_lua}},
  86. \code{\link{render_har}}, \code{\link{render_html}},
  87. \code{\link{render_jpeg}}, \code{\link{render_png}}
  88. }
  89. \concept{splash_renderers}