Generate Webpage Screenshots Using the Statically API
Statically (https://statically.io/screenshot/) maintains a free API to generate screenshots of webpages. Tools are provided to capture website screenshots using this API.
The following functions are implemented:
generate_screenshot
: Generate a webpage screenshotinstall.packages("statically", repos = "https://cinc.rud.is")
# or
remotes::install_git("https://git.rud.is/hrbrmstr/statically.git")
# or
remotes::install_git("https://git.sr.ht/~hrbrmstr/statically")
# or
remotes::install_gitlab("hrbrmstr/statically")
# or
remotes::install_bitbucket("hrbrmstr/statically")
# or
remotes::install_github("hrbrmstr/statically")
NOTE: To use the ‘remotes’ install options you will need to have the {remotes} package installed.
library(statically)
# current version
packageVersion("statically")
## [1] '0.1.0'
Default:
generate_screenshot("https://www.latimes.com/")
Mobile:
generate_screenshot("https://www.latimes.com/", mobile = TRUE)
Full page (not shown b/c it’s super duper long):
generate_screenshot("https://rud.is/b", full_page = TRUE)