0

PROBLEM: I'm trying to take a simple picture of https://www.cbioportal.org/ on webshot but it just produces a completely white png. It works for other websites. Is there something preventing webshot from accessing/ loading it in PhantomJS?

webshot("https://www.cbioportal.org", delay = 1,'cbioportal.png')
Savvas Kourtis
  • 91
  • 1
  • 1
  • 6
  • 1
    I'm getting the same issue. I wonder if it's something specific about that site? – Phil Mar 05 '20 at 05:51
  • I think so but they have some very useful data/ graphs so it would be really useful to be able to access them. Suggestions welcome. – Savvas Kourtis Mar 05 '20 at 08:15

1 Answers1

1

Instead of using webshot, you should consider to try webshot2. See my detailed answer to the similar case.

The code:

# Webshot and phantomjs have been previously installed.
library(webshot2)

webshot("https://www.cbioportal.org", delay = 1,'cbioportal.png')

The output: enter image description here

ozturkib
  • 1,493
  • 16
  • 28
  • I have prepared a blog post including various details about webshot2. You can see the details from http://www.ozturkibrahim.com/export-save-r-graphs-with-webshot/ – ozturkib Apr 28 '20 at 15:30
  • Thank you! finally had to time to check this and it works much better than the original webshot on this website. Had some compatibility problems with chromote package but I flagged the issue on their github and it was solved quickly. Thank again! – Savvas Kourtis May 17 '20 at 14:49
  • @SavvasKourtis It's my pleasure to help you. – ozturkib May 17 '20 at 14:57