splash_png: Return a screenshot of a current page in PNG format.

Description Usage Arguments Value See Also Examples

View source: R/dsl.r

Description

Similar to render_png() but used in a script context. Should be the LAST element in a DSL script chain as this will execute the script and return the PNG content

Usage

1
splash_png(splash_obj)

Arguments

splash_obj

splashr object

Value

a magick image object

See Also

Other splash_dsl_functions: splash_add_lua(), splash_click(), splash_focus(), splash_go(), splash_har_reset(), splash_har(), splash_html(), splash_press(), splash_release(), splash_send_keys(), splash_send_text(), splash_wait()

Examples

1
2
3
4
5
6
7
8
## Not run: 
splash_local %>%
  splash_user_agent(ua_macos_chrome) %>%
  splash_go("https://rud.is/b") %>%
  splash_wait(2) %>%
  splash_png()

## End(Not run)

hrbrmstr/splashr documentation built on Feb. 23, 2020, 2:13 p.m.