3

Let's say I've requested a page and it's fully loaded. Is it possible to save the images from the rendered/loaded page without sending another request for the image? This would be to avoid just collecting the individual image urls and hammering the server for each image again.

Zach Johnson
  • 2,047
  • 6
  • 24
  • 40

1 Answers1

-1

transfer this to python code.

byte[] slideBg = page.locator("xpath=id(\"slideBgWrap\")").screenshot();
ByteArrayInputStream inStreambj = new ByteArrayInputStream(slideBg);
BufferedImage newImage = ImageIO.read(inStreambj);
ImageIO.write(newImage, "jpg", new File(url + "outputImage.jpg"));
yu li
  • 1