Automated Programmatic Website Screenshots in R with {webshot} [Video Tutorial]

In this video tutorial, We explore the R package {webshot} by Winston Chang. This package internally uses phantom js to capture screenshot of web pages / websites, Shiny Applications, RMarkdown documents.

{webshot} also lets you take screenshot of a particular viewport or a section of website selected by css selector.


Please subscribe and leave a comment if you have any feedback. I’m new for this Video making so any suggestion/feedback to improve would be a great benefit!

Please create an R project before trying this out, it makes life simpler in dealing with directories.


Install package from CRAN using install.packages("webshot"). Reference -


# webshot::install_phantomjs()

webshot(url = "", file = "hn.png",
        zoom = 2)

webshot(url = "", file = "hn.pdf")

webshot(url = "",
        selector = ".hero-main",
        file = "anaconda.png")
comments powered by Disqus